Program Problem_D;
{$APPTYPE CONSOLE}
uses
  SysUtils;

Type
  Vector_100 = Array [1..100] of Integer;
Function m1(ch: Char): Integer;
begin
  case ch of
    '0':
      m1 := 0;
    '1':
      m1 := 1;
    '2':
      m1 := 2;
    '3':
      m1 := 3;
    '4':
      m1 := 4;
    '5':
      m1 := 5;
    '6':
      m1 := 6;
    '7':
      m1 := 7;
    '8':
      m1 := 8;
    '9':
      m1 := 9;
  end;
end;
Var
  n: Vector_100;
  a: Vector_100;
  b: Vector_100;
  i: Integer;
  j: Integer;
  k: Integer;
  ch: Char;
  s: String;
Begin
  Assign(input, 'D.in');
  Reset(input);
  s := '';
  repeat
    Read(input, ch);
    if (ch >= '0') and (ch <= '9') then
      s := s + ch;
  until ch = ' ';
  j := 100;
  for i := Length(s) downto 1 do
  begin
    n[j] := m1(s[i]);
    Inc(j, -1);
  end;
  s := '';
  repeat
    Read(input, ch);
    if (ch >= '0') and (ch <= '9') then
      s := s + ch;
  until ch = ' ';
  j := 100;
  for i := Length(s) downto 1 do
  begin
    a[j] := m1(s[i]);
    Inc(j, -1);
  end;
  s := '';
  repeat
    Read(input, ch);
    if (ch >= '0') and (ch <= '9') then
      s := s + ch;
  until Eof(input);
  j := 100;
  for i := Length(s) downto 1 do
  begin
    b[j] := m1(s[i]);
    Inc(j, -1);
  end;
  Close(input);
  for i := 100 downto 1 do
  begin
    if n[i] < a[i] then
    begin
      j := i - 1;
      while n[j] = 0 do
      begin
        n[j] := 9;
        Inc(j, -1);
      end;
      Inc(n[j], -1);
      Inc(n[i], 10);
    end;
    Inc(n[i], -a[i]);
  end;
  k := 0;
  for i := 100 downto 1 do
  begin
    j := n[i];
    n[i] := (j + b[i] + k) mod 10;
    k := (j + b[i] + k) div 10;
  end;
  i := 1;
  while n[i] = 0 do
    Inc(i);
  Assign(output, 'D.out');
  ReWrite(output);
  for j := i to 100 do
    Write(output, n[j]);
  Close(output);
End.
