#include<cstdio>
long long n,a,b;
int main(){
  scanf("%lld%lld%lld",&n,&a,&b);
  printf("%lld\n",n-a+b);
  return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
    ll a,b,c,d;
    cin>>a>>b;
    cin>>c>>d;
    cout<<a*d-c*b<<endl;
}
