program Main;

{$APPTYPE CONSOLE}

uses
  SysUtils;

VAR n,a,b: string;
    c:char;
    k:byte;
    o:string;

function vich(a,b:string):string;
Var i,j,p,la,lb:integer;
    ma,mb,mres:array[1..100] of byte;
    res:string;
Begin
  la:=length(a);
  lb:=length(b);

  for i:=1 to 100 do begin
    ma[i]:=0;
    mb[i]:=0;
    mres[i]:=0;
  end;

  j:=1;
  for i:=la downto 1 do begin
    ma[j]:=strtoint(a[i]);
    j:=j+1;
  end;

  j:=1;
  for i:=lb downto 1 do begin
    mb[j]:=strtoint(b[i]);
    j:=j+1;
  end;

  for i:=1 to la do begin
    if (ma[i]<mb[i]) and (ma[i+1]>0) then begin
      ma[i]:=ma[i]+10;
      ma[i+1]:=ma[i+1]-1;
    end;
    mres[i]:=ma[i]-mb[i];
  end;


  p:=0;
  for i:=1 to la do
    if mres[i]>0 then p:=i;

  res:='';
  if p>0 then
    for i:=1 to p do res:=inttostr(mres[i])+res
  else res:='0';

  vich:=res;

End;

BEGIN
  assign(input,'D.in');
  reset(input);
  assign(output,'D.out');
  rewrite(output);

  k:=1;
  while not(eof) do begin
    read(c);
    if c=' ' then k:=k+1
    else case k of
      1: n:=n+c;
      2: a:=a+c;
      3: b:=b+c;
    end;        
  end;

  o:=vich(n,vich(a,b));
  writeln(o);


  close(output);
END.
