#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
//namespace mp = boost::multiprecision;
//using Bll = mp::cpp_int;
using namespace std;
#define ll long long
#define rep(i, m, n) for (ll i = m; i < n; i++)
#define rrep(i, m, n) for (ll i = m - 1; i >= n; i--)
#define pb(n) push_back(n)
#define UE(N) N.erase(unique(N.begin(), N.end()), N.end());
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(), n.end())
#define HpOut(S) cout << setprecision(50) << S << endl
#define Vec(K, L, N, S) vector<L> K(N, S)
#define DV(K, L, N, M, S) vector<vector<L>> K(N, vector<L>(M, S))
#define TV(K, L, N, M, R, S) \
    vector<vector<vector<L>>> K(N, vector<vector<L>>(M, vector<L>(R, S)))
#define pint pair<ll, ll>
#define tint tuple<ll, ll, ll>
#define paf(L, R) pair<L, R>
#define mod 998244353
#define MAX 10010
#define ALL(a) a.begin(), a.end()
#define chmax(a, b) a = (((a) < (b)) ? (b) : (a))
#define chmin(a, b) a = (((a) > (b)) ? (b) : (a))

int main() {
    ll a, b, c, d;
    cin >> a >> b >> c >> d;
    cout << a*d - b * c << endl;
}
#include <bits/stdc++.h>
using namespace std;

int main(void)
{
    long long a,b,c,d;
    long long ans=0;
    cin >> a >> b >> c >> d;

    ans=(a*d)-(b*c);

    cout << ans << endl;

    return 0;
}