const max=255;
var
a,b,c:array[1..max] of integer;
n,n1,n2:string;
lena,lenb,lenc,i:integer;
begin
assign(input,'sub.in');reset(input);
assign(output,'sub.out');rewrite(output);
readln(n1);
readln(n2);
if(length(n1)<length(n2)) or (length(n1)=length(n2)) and (n1 < n2) then
begin
n:=n1; n1:=n2; n2:=n;
write('-');
end;
lena:=length(n1); lenb:=length(n2);
for i:=1 to lena do a[lena-i+1]:=ord(n1[i])-ord('0');
for i:=1 to lenb do b[lenb-i+1]:=ord(n2[i])-ord('0');
i:=1;
while i<=lena do
begin
if a[i]<b[i] then
begin
a[i]:=a[i]+10;
a[i+1]:=a[i+1]-1;
end;
c[i]:=a[i]-b[i];
i:=i+1;
end;
lenc:=i;
while(c[lenc]=0) and (lenc>1) do dec(lenc);
for i:=lenc downto 1 do write(c[i]);
close(input);close(output);
end.