#include <bits/stdc++.h>

#define ll             long long
#define sf             scanf
#define pf             printf
#define nl             printf("\n")
#define pb             push_back
#define TEST           int Test;cin>>Test;for(int _t=1;_t<=Test;_t++)

using namespace std;

int main()
{
	int a,b,c,d;
	sf("%d %d %d %d",&a,&b,&c,&d);
	pf("%d\n",(a*d)-(b*c));
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
const int N = 1e7+10;
int p[N];
const ll MOD=(ll)(1e9)+(ll)(7); //is prime

int main() {
	ios::sync_with_stdio(0); cin.tie(0);
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    cout << b-c;

}
