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






int main()
{
    ios_base ::sync_with_stdio(0);
    cin.tie(0);


    int a, b, c, d;
    cin >> a >> b >> c >> d;

    int x= (a * d) - (c * b);

    cout << x;
    return 0;
}

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

#define long long long
#define vb vector<bool>
#define vi vector<int>
#define vii vector<pair<int, int>>
#define vs vector<string>
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define FORs(i,a,b,c) for (int i = a; i < b; i+=c)
#define DPMOD 1000000007

int main() {
    // freopen("input.txt", "r", stdin);

    int a; cin >> a;
    int b; cin >> b;
    int c; cin >> c;
    int d; cin >> d;
    cout << a*d - b*c << '\n';
    return 0;
}
