#include <iostream>
using namespace std;
int main()
{
    int res, matrix[4];
    for (auto i = 0; i < 4; i++)
    {
        cin >> matrix[i];
    }
    res = matrix[0] * matrix[3] - matrix[1] * matrix[2];
    cout << res;
    return 0;
}
#include<bits/stdc++.h>
#define fo(i,a,b) for((i)=(a);i<=(b);i++)
#define rfo(i,a,b) for((i)=(a);i>=(b);i--)
#define inrange(x,y,z) (((x)>=(y))&&((x)<=(z)))
#define ALL(vec) (vec).begin(),(vec).end()
#define SOR(vec) sort(ALL(vec))
#define UNI(vec) (vec).erase(unique(ALL(vec)),(vec).end())
using namespace std;
int a,b,c,d;
int main(){
	#ifdef FILIN
		#ifndef DavidDesktop
			freopen(FILIN,"r",stdin);
			freopen(FILOUT,"w",stdout);
		#endif
	#endif
	ios::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>a>>b>>c>>d;
	cout<<a*d-b*c<<endl;
	return 0;
}
