program D;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 a: string;
 N: array[1..3] of array[1..102] of shortint;
 answer, answer2: array[1..102] of shortint;
 s,ss: string;

procedure Mozg;
var
 i,t: integer;
 min,max: integer;
 temp: integer;

 procedure Sum;
 var
  i,t: integer;
  max: integer;
  value1: shortint;
  value2: shortint;
  ost: integer;
 begin
  ost:=0;
  for i:=102 downto 1 do begin
   value1:=n[3,i]+ost;
   value2:=answer[i];
   answer2[i]:=(value1+value2) mod 10;
   ost:=(value1+value2) div 10;
  end;
 end;

 procedure Minus;
 var
  i,t: integer;
  max: integer;
  value1: shortint;
  value2: shortint;
 begin

  for i:=102 downto 1 do begin
   value1:=n[1,i];
   value2:=n[2,i];
   if value1<value2 then begin
    Dec(n[1,i-1]);
    value1:=value1+10;
   end;

   answer[i]:=(value1-value2);
  end;
 end;

begin
 Minus;
 Sum;

end;

procedure LoadData;
var
 f: textfile;
 i,t,z: integer;
begin
 assignfile(f,'D.in');
 reset(f);
 read(f,s);
 t:=1;
 ss:=s;

 for t:=1 to 3 do begin
  z:=pos(' ',s);
  if z=0 then z:=102;
  ss:=copy(s,1,z-1);
  for i:=length(ss) downto 1 do
   n[t,102-(length(ss)-i)]:=strtoint(ss[i]);

  s:=copy(s,z+1,101);
 end;

 closefile(f);
end;

procedure WriteData;
var
 f: textfile;
 i,t: integer;
 v: integer;
begin
 assignfile(f,'A.out');
 rewrite(f);


 for i:=1 to 102 do
  if answer2[i]<>0 then begin
   v:=i;
   break;
  end;

 for i:=v to 102 do write(f,answer2[i]);
 closefile(f);
end;


begin
 LoadData;
 Mozg;
 WriteData;

end.
