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

int main(void) {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int a,b,c,d;
    cin >> a >> b >> c >> d;
    cout << a * d - b * c << endl;
}
#include <iostream>
#include <vector>
#include <string>
#include <array>
#include <functional>
#include <algorithm>
#include <stack>
#include <map>
#include <set>
#include <climits>
#include <queue>
#include <bitset>
#include <cassert>
#include <math.h>
#include <complex>
#include <iomanip>
using namespace std;
#define ll long long
#define pb(x) push_back(x)
#ifdef _OLIMPOLOCAL
    #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
    #define debug(...) 1337
#endif
void debug_out() { cout << "\n";}
template<typename T1, typename... T2> void debug_out(T1 A, T2... B) { cout << " " << A; debug_out(B...); }
int test = 1;
#define OUT(x) cout << x << "\n";return;
//-------------------------- ^ DONT TOUCH ^-----------------------------------------------------------------
#define MOD 998244353ll
const int lm = 100000; 

int a, b , c , d;
void solve() {
    cin >> a >> b >> c >> d;
    cout << a *d - b * c << endl;
}

int main(int argc, const char * argv[]) {
    
    ios_base::sync_with_stdio(0);cin.tie(0);
    #ifdef _OLIMPOLOCAL
        cin >> test;
    #endif
    for (int testCount = 1; testCount <= test; testCount++)
    {
        #ifdef _OLIMPOLOCAL
            cout << "---------------Test case " << testCount << "---------------"<< endl;
        #endif
        solve();
    }
    
    return 0;
}