#include<bits/stdc++.h>
#include<string>
using namespace std;
const int N=1e3+10;
typedef   long long ll;

int n,k,q,m,h,w;
const ll mod=998244353;
int a[N];
int b[N];
map<int,map<int,int> > mp;
set<int> se;
string s;
stack <int> st;
int X[]={-1,-1,-1,0,0,1,1,1};
int Y[]={-1,0,1,-1,1,-1,0,1};

int main()
{
    int A,B,C,D;
    cin>>A>>B>>C>>D;
    cout<<A*D-B*C;

}








#include<bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define int long long
#define mod 1000000007
#define pb push_back  
#define endl "\n"
#define fi first
#define se second 
#define ll long long
#define inf 9000000000000000000
#define PI 3.14159265359

int power(int a,int b,int m=mod)
{
     if(b==0)	return 1;
     if(b==1)	return a;
	 int res=power(a,b/2,m);
	 res=(res*res)%m;
     if(b&1)	res=(res*a)%m;
     return res;
}
int modinv(int a,int m=mod){ return power(a,m-2,m);}
int add(int a,int b,int m=mod){	int c=(a%m+b%m);	if(c>=m)	c-=m;	return c;}
int sub(int a,int b,int m=mod){	int c=(a%m-b%m);	if(c<0)		c+=m;	return c;}
int mul(int a,int b,int m=mod){	return (a*b)%m;}


int32_t main()
{
   IOS
   
   int n,a,b;
   cin>>n>>a>>b;
   
   int p = max(0LL,n-a);
   cout<<p+b<<endl;

   
   
}