var
a,b,c:array[1..256] of integer;
t,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
t:=n1;
n1:=n2;
n2:=t;
write('-');
end;
lena:=length(n1);
lenb:=length(n2);
for i:=1 to lena do
a[lena-i+1]:=ord(n1[i])-48;
for i:=1 to lenb do
b[lenb-i+1]:=ord(n2[i])-48;
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];
inc(i);
end;
lenc:=i;
while (c[lenc]=0) and (lenc>1) do
dec(lenc);
for i:=lenc downto 1 do
write(c[i]);
end.