uses crt;
var s,st,kq,t:string;
i,nho,k:shortint;
dau:char;
begin
clrscr;
readln(s);
readln(st);
dau:='+';
if length(s)<length(st) then
begin
t:=s;s:=st;st:=t;dau:='-';
end
else if length(s)=length(st) then
if s<st then
begin
t:=s;s:=st;st:=t;dau:='-';
end;
while length(s)<length(st) do s:='0'+s;
while length(st)<length(s) do st:='0'+st;
kq:='';
for i:=length(s) downto 1 do
begin
k:=ord(s[i])-ord(st[i]);
if k<0 then
begin
nho:=1;
if i<>1 then
k:=k+10
else k:=abs(k);
end
else nho:=0;
if i<>1 then
k:=k+nho;
kq:=chr(k+48)+kq;
end;
if dau='-' then
kq:=dau+kq;
writeln(kq);
readln;
end.