#include <bits/stdc++.h>
#define li long int
#define lli long long 
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define si size()
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define lb lower_bound
#define ub upper_bound
#define BS binary_search
#define pll pair < lli, lli >
#define pii pair < int, int>
#define vi vector < int >
#define vvi vector < vector < int > >
#define vlli vector < lli >
#define all(x) x.begin(), x.end()
#define vvlli vector < vector < lli > >
#define vp vector < pll >
#define vvp vector< vector< pll> >
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#define ordered_set tree<lli  , null_type, less<lli>, rb_tree_tag,tree_order_statistics_node_update>
#define fill(a,n) for(lli iiii=0;iiii<n;iiii++)	cin>>a[iiii];
#define mpii map<int, int>
# define precision(x) cout << fixed << setprecision(x)
#define REP(i, a, b) for (int i=a; i<=b; i++)
using namespace __gnu_pbds;
lli mod=1e9+7;
using namespace std;  

int main()
{
    fastio;
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	int aa=(a*d)-(b*c);
	cout<<aa<<"\n";
}
#include <iostream>

void solve() {
    int a, b, c, d;
    std::cin >> a >> b >> c >> d;
    std::cout << a * d - b * c << "\n";
}

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    solve();

    return 0;
}
