#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
long long a[100000001],b[100000001],c[100000001];
string add(string a,string b){

}
string sub(string s1,string s2){
	string s1s;
long long maxn=0;
	if(s2.size()>s1.size() || (s2.size()==s1.size() && s2>s1)){
		cout<<"-";
		swap(s1,s2);
	}
	reverse(s1.begin(),s1.end());
	reverse(s2.begin(),s2.end());
	for(int i=0;i<s1.size();i++){
		a[i]=(int)(s1[i]-48);
	}
	for(int i=0;i<s2.size();i++){
		b[i]=(int)(s2[i]-48);
	}
	maxn=max(s1.size(),s2.size());
	for(int i=0;i<maxn;i++){
		c[i]=c[i]+a[i]-b[i];
		if(c[i]<0){
			c[i]+=10;
			c[i+1]--;
		}
	}
	if(s1==s2 || (s1[s1.size()-1]==0 && s2[s2.size()-1]==0)){
		cout<<"0";
		return 0;
	}
	int f=0,w=0;
	w=maxn;
	for(int i=0;i<=w;i++){
		if(c[maxn]!=0 || f==1){
			s1s+=c[maxn];
			f=1;
		}
		maxn--;
	}
	return s1s;
}
//string mul(string a,string b){
//
//}
struct number{
    string num;
    friend string operator + (number a,number b){
        return add(a.num,b.num);
    }
    friend string operator - (number a,number b){
        return sub(a.num,b.num);
    }
//    friend string operator * (number a,number b){
//        return mul(a.num,b.num);
//    }
};
int main(){
    number a,b;
    cin>>a.num>>b.num;
    cout<<a-b;
	return 0;
}



	
