Problem:
Score : 100 points

Problem Statement

There are H rows and W columns of white square cells.

You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns.

How many white cells will remain?

It can be proved that this count does not depend on what rows and columns are chosen.

Constraints

All values in input are integers.

1 \leq H, W \leq 20

1 \leq h \leq H

1 \leq w \leq W

Input

Input is given from Standard Input in the following format:

H W
h w

Output

Print the number of white cells that will remain.

Sample Input 1

3 2
2 1

Sample Output 1

1

There are 3 rows and 2 columns of cells. When two rows and one column are chosen and painted in black, there is always one white cell that remains.

Sample Input 2

5 5
2 3

Sample Output 2

6

Sample Input 3

2 4
2 4

Sample Output 3

0

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include "bits/stdc++.h"
#include <cmath>
using namespace std;

#define f first
#define s second

#define pb push_back
#define pp pop_back
#define mp make_pair

#define sz(x) (int)x.size()
#define sqr(x) ((x) * 1ll * (x))
#define all(x) x.begin(), x.end()
#define clr(a,v) memset(a, v, sizeof(a))

#define rep(i, l, r) for (int i = (l); i <= (r); i++)
#define per(i, l, r) for (int i = (l); i >= (r); i--)
#define reflex ios_base::sync_with_stdio(false)

#define nl '\n'
#define ioi exit(0);

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

typedef pair<int,int> pii;
typedef pair<int,int> pll;
const int N= (int)2e5 + 7;
const int inf = (int)1e9 + 7;
const int mod = (int)1e9 + 7;
const ll linf = (ll)1e18 + 7;

const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int kx[] = {-1,1,2,2,1,-1,-2,-2};
const int ky[] = {2,2,1,-1,-2,-2,-1,1};

string conv(int a){
	stringstream ss;
	ss << a;
	string str = ss.str();
	return str;
}


string conv(char a){
	stringstream ss;
	ss << a;
	string str = ss.str();
	return str;
}

int conv(string a){
    stringstream geek(a); 
    int x = 0; 
    geek >> x;   
	return x;
}


int main(){
	int H,  W; cin>> H >> W;
	int h, w; cin>> h >> w;
	cout<< W*H - (h*W + (H-h)*w);
	return 0;
}


//Problem A
/*
 int v[100010];
int x1[100010];
int x2[100010];

int main(){
	clr(x1,0);
	clr(x2,0);
	int n; cin>> n;
	rep(i,1,n)
		cin>> v[i];
	rep(i,1,n){
		if(v[i] == 2)
			x2[i] = x2[i-1] + 1;
	}
	per(i,n,1){
		if(v[i] == 1)
			x1[i] = x1[i+1] + 1;
	}
	int maxi = 0;
	rep(i,1,n-1){
		if(v[i] != v[i+1]){
			//~ cout<<i<<":"<<x2[i]<<" "<<i+1<<":"<<x1[i+1]<<endl;
			maxi = max(maxi, min(x2[i],x1[i+1]));
		}
	}
	//~ rep(i,1,n)
		//~ cout<<x2[i]<<" "; 
	//~ cout<< endl;
	//~ rep(i,1, n)
		//~ cout<<x1[i]<<" ";
	//~ cout<<endl;
	//~ cout<<endl;
	clr(x1,0);
	clr(x2,0);
	rep(i,1,n){
		if(v[i] == 1)
			x1[i] = x1[i-1] + 1;
	}
	per(i,n,1){
		if(v[i] == 2)
			x2[i] = x2[i+1] + 1;
	}
	
	rep(i,1,n-1){
		if(v[i] != v[i+1]){
			//~ cout<<i<<":"<<x2[i]<<" "<<i+1<<":"<<x1[i+1]<<endl;
			maxi = max(maxi, min(x1[i],x2[i+1]));
		}
	}
	
	//~ cout<< maxi<<endl;
	cout<<2*maxi<<endl;
	//~ rep(i,1,n)
		//~ cout<<x2[i]<<" "; 
	//~ cout<< endl;
	//~ rep(i,1, n)
		//~ cout<<x1[i]<<" ";
	//~ cout<<endl;
	return 0;
}

 */