var
A,N,B,X:array[0..100]of integer;
a1,n1,b1,x1:byte;
i,j:Byte;
c:char;
f:text;
begin
for i:=1 to 100 do n[i]:=0;
for i:=1 to 100 do a[i]:=0;
for j:=1 to 100 do b[j]:=0;
for x1:=1 to 100 do x[x1]:=0;
assign(f,'D.in');
reset(f);
a1:=0;
n1:=0;
b1:=0;
x1:=0;

repeat
read(f,c);
inc(n1);
if c<>' ' then n[n1]:=ord(c)-ord('0')
else dec(n1);
until c=' ';

repeat
read(f,c);
inc(a1);
if c<>' ' then a[a1]:=ord(c)-ord('0')
else dec(a1);
until c=' ';

repeat
read(f,c);
inc(b1);
if c in['0'..'9'] then b[b1]:=ord(c)-ord('0')
else dec(b1);
until not(c in['0'..'9']);

close(f);

  x1:=n1;
  for i:=0 to b1-1 do
  begin
    x[x1-i]:=n[n1-i]+b[b1-i]+x[x1-i];
    x[x1-i-1]:=x[x1-i]div 10;
    x[x1-i]:=x[x1-i]mod 10;
  end;
  for i:=b1 to n1-1 do
  begin
    x[x1-i]:=n[n1-i]+x[x1-i];
    x[x1-i-1]:=x[x1-i]div 10;
    x[x1-i]:=x[x1-i]mod 10;
  end;

  for i:=0 to a1-1 do
  begin
    x[x1-i]:=x[x1-i]-a[a1-i];
    j:=i;
    while (x[x1-j]<0)and(j>=0) do
    begin
      dec(x[x1-j-1]);
      Inc(x[x1-j],10);
    end;
  end;

i:=0;
while x[i]=0 do inc(i);

assign(f,'D.out');
rewrite(f);
for i:=i to x1 do write(f,X[i]);
close(f);
 { TODO -oUser -cConsole Main : Insert code here }

end.
