var
a,b,s:ansistring;
c,d,i:longint;
f:array[1..200]of longint;
begin
assign(input,'sub.in');
reset(input);
assign(output,'sub.out');
rewrite(output);
readln(a);
readln(b);
c:=length(a);
d:=length(b);
if a=b then
begin
writeln(0);
exit;
end;
if (d>c)or((d=c)and(b>a)) then
begin
s:=a;a:=b;b:=s;
i:=c;c:=d;d:=i;
write('-');
end;
for i:=c downto 1 do
inc(f[c-i+1],ord(a[i])-48);
for i:=d downto 1 do
dec(f[d-i+1],ord(b[i])-48);
for i:=1 to c do
begin
inc(f[i+1],(f[i]-9) div 10);
inc(f[i],((9-f[i]) div 10)*10);
end;
i:=200;
while f[i]=0 do dec(i);
for i:=i downto 1 do
write(f[i]);
writeln;
close(input);
close(output);
end.