#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
typedef long long ll;
typedef long double ld;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define mod 1000000007
#define pii pair<ll,ll>
#define inf 1000000000000000000
#define bpc(x) __builtin_popcountll(x)
#define autoit(x,it) for(auto it = x.begin(); it != x.end(); it++)
#define autoitr(x,it) for(auto it = x.rbegin(); it != x.rend(); it++)
#define rep(n) for(ll i = 0; i < n; i++)
#define repi(i,n) for(ll i = 0; i < n; i++)

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 

#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 

using namespace std;
mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());

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

int main()
{
  vector<int> A1(2),A2(2);

  for(int i =0; i <2; i++)
  {
    cin >> A1[i];
  }
    for(int i =0; i <2; i++)
  {
    cin >> A2[i];
  }

  int ans = A1[0]*A2[1]-A1[1]*A2[0];

  cout << ans << endl;
}