#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<cmath>
#include<set>
#include<map>
#include<vector>

#define BASE 10

using namespace std;

int a[1111],b[1111],c[1111];

string sub(string x, string y) {
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	for (int i=0; i < x.size(); i++)
		a[x.size()-i]=x[i]-'0';
	for (int i=0; i < y.size(); i++)
		b[y.size()-i]=y[i]-'0';
	memset(c,0,sizeof(c));
	for (int i=1; i <= x.size(); i++) {
		c[i]+=a[i]-b[i];
		if (c[i] < 0) {
			c[i]+=BASE;
			c[i+1]--;
		}
	}
	string ret="";
	for (int t=x.size(); t >= 1; t--)
		if (c[t] != 0) {
			for (int j=t; j >= 1; j--)
				ret+=char(c[j]+'0');
			return ret;
		}
	return "0";
}

int main() {
	freopen("D.in","r",stdin);
	freopen("D.out","w",stdout);
	string x,y,z;
	cin  >> x >> y >> z;
	y=sub(y,z);
	x=sub(x,y);
	cout << x << "\n";
	return 0;
}
