# include <iostream>
# include <string>
# include <cmath>
using namespace std;

struct bigInt{

	int a[10000];

	int len;

	};


istream& operator >> (istream &is, bigInt &c){

	string s;

	is>>s;

	c.len=s.length();

	for(int i=0; i<c.len; i++)

	c.a[c.len-1-i]=s[i]-'0';

	return is;

}; 

ostream& operator << (ostream &os, bigInt &c){

	for(int i=c.len-1; i>=0; i--)

	os<<c.a[i];

	os<<endl;

	return os;

};

bigInt operator + (bigInt d, bigInt b){

	bigInt c;

        memset(c.a, 0, sizeof(c.a));

	c.len=max(d.len, b.len);

	int curry=0;

	for(int i=0; i<c.len; i++) {
	c.a[i]=d.a[i]+b.a[i]+curry;
	curry=c.a[i]/10;
	c.a[i]%=10;
	}

	if(curry!=0){
	
	c.len++;

	c.a[c.len-1]=curry;
	
	}

	while(c.a[c.len-1]==0 && c.len!=1)

	c.len--;

return c;	

};


bigInt operator - (bigInt d, bigInt b){

	bigInt c;

        memset(c.a, 0, sizeof(c.a));

	c.len=d.len;

	while(b.len!=c.len){
	
	b.len++;

	b.a[b.len-1]=0;
	
	}

	for(int i=0; i<b.len; i++){

	if(d.a[i]>=b.a[i])

	c.a[i]=d.a[i]-b.a[i];

	else if(d.a[i+1]>0){
	
	d.a[i+1]--;

	d.a[i]=d.a[i]+10;

	c.a[i]=d.a[i]-b.a[i]; 
	
	}

	else{
	
	  int index=(i+1);

	  while(index==0){
	  
	  index++;

	  }


	c.a[index]--;

	for(int j=i+1; j<index; j++){
	
	c.a[j]=9;
		
	}

	  d.a[i]=d.a[i]+10;

	  c.a[i]=d.a[i]-b.a[i];
			
	}

}

 while(c.a[c.len-1]==0 && c.len!=1)

	c.len--;

return c;	

};



int main(){
      
      freopen("D.in","r",stdin);
      freopen("D.out","w",stdout);
       bigInt n,a,b,c;
             

        cin>>n;
        cin>>a;
        cin>>b;

     
              c=n-a;
              c=c+b;
              
           
               cout<<c;

   return 0;

}
