#include <iostream>
using namespace std;
int main(void) {
	int a[2][2]; 
	int i, j;
	for (i = 0;i < 2;++i) {
		for (j = 0;j < 2;++j) {
			cin >> a[i][j];
		}
	}
	int ans = a[0][0] * a[1][1] - a[0][1] * a[1][0];
	cout << ans << endl;
}
#include <bits/stdc++.h>
typedef long long       ll;
#define PI                acos(-1)
#define pb                push_back
#define mp                make_pair
#define mt                make_tuple
#define all(a)            (a).begin(), (a).end()
#define clr(a,h)          memset(a, (h), sizeof(a))
#define F first
#define S second
#define fore(i,b,e)		  for(int i=(int)b;i<(int)e;++i)
#define forr(i,b,e)		  for(int i=(int)b;i<(int)e;++i)
#define deb(x)			  cerr << "# " << (#x) << " = " << (x) << endl;
#define sz(x)             (int)x.size()
int faster_in(){int r=0,c;for(c=getchar();c<=32;c=getchar());if(c=='-') return -faster_in();for(;c>32;r=(r<<1)+(r<<3)+c-'0',c=getchar());return r;}

using namespace std;

typedef pair<int, int>  ii;
typedef vector<int>     vi;
typedef vector<ii>      vii;
typedef vector<ll>      vll;
const int INF = 1234567890;

int main()
{
    std::ios::sync_with_stdio(false); cin.tie(0);
    //freopen("","r",stdin);
    //freopen("","w",stdout);
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    cout << a*d - b*c << '\n';
    return 0;
}
// Dinosaurs are cool!