#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
using namespace std;

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


}
#include <bits/stdc++.h>
#define PI acos(-1)
#define eq(x,y) (fabs((x)-(y)) < eps)
#define debug(x) cerr<<#x<<" = "<<x<<endl;
#define pb push_back
#define eb emplace_back
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define bump cout<<"bleh\n"
#define all(v) (v).begin(),(v).end()
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define file freopen("input.txt", "r", stdin)
#define reset(x,n) memset(x,n,sizeof(x))

/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set tree<pair<int,int>, null_type,less<pair<int,int>>, rb_tree_tag,tree_order_statistics_node_update>
using namespace __gnu_pbds;
*/

/*
find_by_order(k): It returns to an iterator to the kth element (counting from zero)
order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
*/



using namespace std;

typedef long long ll;
typedef unsigned long long llu;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int inf=1e9+7;
const int nmax=1e5+10;
const int eps=1e-8;
const ll infll=1e18+10;

const int len = 3e5+10;
int tree[4*len];
int ara[len];

void build(int node, int start, int endd)
{
    if(start==endd)
    {
        tree[node]=ara[start];
    }else
    {
        int mid=(start+endd)/2;
        build(2*node,start,mid);
        build(2*node+1,mid+1,endd);

        tree[node]=tree[2*node]^tree[2*node+1];
    }
}

void update(int node, int start, int endd, int idx, int val)
{

    if(start==endd)
    {
        ara[idx]=val;
        tree[node]=val;

    }else
    {
        int mid=(start+endd)/2;

        if(idx>=start and idx<=mid)
            update(2*node,start,mid,idx,val);
        else
            update(2*node+1,mid+1,endd,idx,val);


        tree[node]=tree[2*node]^tree[2*node+1];
    }

}

int query(int node,int start,int endd, int l, int r)
{
    if(start>=l and endd<=r)
        return tree[node];

    if(start>r or endd<l)
        return 0 ;

    int mid=(start+endd)/2;
    int p1=query(2*node,start,mid,l,r);
    int p2=query(2*node+1,mid+1,endd,l,r);
    int ans=p1^p2;

    return ans;

}

inline void solve()
{
	int a,b,c,d;
	cin>>a>>b>>c>>d;

	int x = (a*d) - (b*c);
	cout<<x<<"\n"; 


}
/*
-> sometimes thinking in reverse makes it easier!
-> check for overflow! pay attention to constraints!
-> maybe write a bruteforce locally for clues!
*/

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    fastio;
	//int t;
	//cin>>t;

	//while(t--){
		solve();
	//}

    return 0;
}

/*



*/
