{$H+}
var a,b,c,d,r:array[0..200]of longint;
    s:string;
    al,i,q,w,l:longint;

procedure asd;
 begin
   for i:=1 to q do
    r[i]:=a[i]-b[i];

   for i:=1 to q do
    if r[i]<0 then begin
      while r[i]<0 do begin
        r[i]:=r[i]+10;
        dec(r[i+1]);
      end;
    end;
   while r[q]=0 do dec(q);

   for i:=1 to q do
    d[i]:=r[i]+c[i];
   for i:=1 to q do
    if d[i]>=10 then begin
      d[i+1]:=d[i+1]+d[i] div 10;
      d[i]:=d[i] mod 10;
    end;
   while d[q+1]>0 do inc(q);
 end;

begin
  assign(input,'D.in');   reset(input);
  assign(output,'D.out'); rewrite(output);
   readln(s);   
   for i:=1 to length(s) do 
    if s[i]=' ' then begin
      q:=i;
      break;
    end;
   for i:=q+1 to length(s) do
    if s[i]=' ' then begin
      w:=i;
      break;
    end;
   
   l:=0;
   for i:=q-1 downto 1 do begin
     inc(l);
     a[l]:=ord(s[i])-48;
   end;
   al:=l;   
   l:=0;
   for i:=w-1 downto q+1 do begin
     inc(l);
     b[l]:=ord(s[i])-48;
   end;     
   l:=0;
   for i:=length(s) downto w+1 do begin
     inc(l);
     c[l]:=ord(s[i])-48;
   end;     
   q:=al;
   asd;
   
   for i:=q downto 1 do
    write(d[i]);
   writeln;
  close(output);
end.