#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<string>
#include<cstdio>
using namespace std;
string s1,s2,s3;
int a[50000],b[50000];
int main()
{
cin>>s1>>s2;
if(s1<s2)
{
s3=s1;
s1=s2;
s2=s3;
cout<<"-";
}
a[0]=s1.size();b[0]=s2.size();
for(int i=1;i<=a[0];++i)
a[i]=s1[a[0]-i]-'0';
for(int i=1;i<=b[0];++i)
b[i]=s2[b[0]-i]-'0';
int n=max(a[0],b[0]);
for(int i=1;i<=n;++i)
{
if(a[i]<b[i])
{
--a[i+1];
a[i]+=10;
}
a[i]=a[i]-b[i];
}
while(a[n]==0&&n>1) n--;
for(int i=n;i>0;--i)
cout<<a[i];
cout<<endl;
return 0;
}