#include<bits/stdc++.h>

using namespace std;

#define all(v)				((v).begin()), ((v).end())
#define allr(v)				((v).rbegin()), ((v).rend())
#define sz(v)				((int)((v).size()))
#define ll long long
#define pb					push_back
#define fIO ios_base::sync_with_stdio(0);cin.tie(0);

const ll oo = 1e8;
const double pi = 3.1415926535897;


const double EPS = (1e-7);
int dcmp(double x, double y) {	return fabs(x-y) <= EPS ? 0 : x < y ? -1 : 1;	}


typedef vector<int>                vi;
typedef vector<pair<int,int>>      vii;
typedef vector<ll>                 vll;
typedef vector<double>             vd;
typedef vector< vi >               vvi;
typedef vector< vd >               vvd;
typedef vector<string>             vs;
typedef pair<int, int>             pii;

/**
    * PLEASEEE READDD PROBLEEEM CARFULLY ****
    * Always check for OVERFLOW ll vs int
    * Always check for array bounds
    * Check for function return
    * READ OUTPUT SECTION AGAIN!!!
**/

struct edge{
    int from, to, w;

    edge(){}
    edge(int x, int y, int we): from(x), to(y), w(we){}

    bool operator < (const edge &rhs) const{
        return w > rhs.w;
    }

};

int main(){
    fIO
//    freopen("", "r", stdin);
//    freopen("", "w", stdout);

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

    cout << a * d - b * c;
}







#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define br "\n"
#define sp " "
#define pie 3.141592653589793238462643383279
#define fo(i, n) for(int i=0;i<n;i++)
#define rfo(i, n) for(int i=n-1;i>=0;i--)
#define forl(i,a,n) for(int i=a;i<n;i++)
#define forr(i,a,n) for(int i=n-1;i>=a;i--)
#define tr(it, x) for(auto it = x.begin(); it != x.end(); it++)
#define trr(it, x) for(auto it = x.rbegin(); it != x.rend(); it++)
#define deb(x) cout << #x << " = " << x << endl;
#define deb2(x, y) cout << #x << " = " << x << ", " << #y << " = " << y << endl
#define deba(i, a, n) fo(i, n){cout << a[i] << " ";}
#define popcount(x) __builtin_popcount(x)  // count the number of one’s(set bits) in an integer.
#define popcountll(x) __builtin_popcountll(x)
#define clz(x) __builtin_clz(x)   // count the leading zeros(binary representation) of the integer
#define clzll(x) __builtin_clzll(x)
#define ctz(x) __builtin_ctz(x)   // count the trailing zeros(binary representation) of the integer
#define ctzll(x) __builtin_ctzll(x)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define gcd __gcd
#define lcm(a,b) (a*b)/gcd(a,b)
#define deci(n) fixed << setprecision(n)
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define max4(a,b,c,d) max(a,max3(b,c,d))
#define min4(a,b,c,d) min(a,min3(b,c,d))
#define max5(a,b,c,d,e) max(max4(a,b,c,d),e)
#define min5(a,b,c,d,e) min(min4(a,b,c,d),e)
#define p0(a) cout << a << " "
#define p1(a) cout << a << br
#define p2(a, b) cout << a << " " << b << br
#define p3(a, b, c) cout << a << " " << b << " " << c << br
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d << br
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define sort(x,n) sort(x, x+n)
#define rsort(x,n) sort(x, x+n, greater<int>())
typedef pair<int, int> pii;
typedef pair<ll, ll> pl;
typedef pair<double, double> pd;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpii;
typedef vector<pl> vpl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef priority_queue<int, vector<int>, greater<int>> minpq;
typedef priority_queue<int> pq;
typedef unordered_map<int,int> umii;
typedef map<int,int> mii;
typedef set<int> si;
typedef deque<int> di;
typedef queue<int> qi;

mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
    uniform_int_distribution<int> uid(0,lim-1);
    return uid(rang);
}

int midofthree(int a,int b,int c)
{
    if((a<=b and a>=c) or (a<=c and a>=b))
        return a;
    else if((b>=a and b<=c) or (b<=a and b>=c))
        return b;
    return c;
}

ll fact(int n){
    if(n==1 || n==0){
        return 1;
    }
    else{
        return n*fact(n-1);
    }
}

bool isPrime(int n) 
{ 
    if (n <= 1) 
        return false; 
  
    for (int i = 2; i*i <= n; i++) 
        if (n % i == 0) 
            return false; 
  
    return true; 
} 

const int MOD = 1e9 + 7;
int mod=MOD;
/* ========== YOUR CODE HERE ========= */

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

}

/* ========== YOUR CODE HERE ========= */

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());

    int t = 1;
    // cin>>t;
    while(t--) {
        solution();
    }

    return 0;
}
// By Ashwani Kumar, Indian Institute Of Technology(IIT), Guwahati.