#include <bits/stdc++.h>
using namespace std;
int a[100005],b[100005],c[100005];
string add(string as,string bs){
memset(a,0,sizeof a);
memset(b,0,sizeof b);
memset(c,0,sizeof c);
string cs;
if((as.size()<bs.size())||((as.size()==bs.size()))&&as<bs){
swap(as,bs);
cs+='-';
}
int al=as.size(),bl=bs.size();
int cl=max(al,bl);
for(int i=1;i<=al;i++){
a[i]=as[al-i]-'0';
}
for(int i=1;i<=bl;i++){
b[i]=bs[bl-i]-'0';
}
for(int i=1;i<=cl;i++){
if(a[i]<b[i]){
a[i]+=10;
a[i+1]--;
}
c[i]=a[i]-b[i];
}
while(c[cl]==0&&cl>1){
cl--;
}
for(int i=cl;i>=1;i--){
cs+=c[i]+'0';
}
return cs;
}
int main(){
string as,bs;
cin>>as>>bs;
cout<<add(as,bs);
return 0;
}