#include <bits/stdc++.h>
using namespace std;

#define all(x) (x).begin(),(x).end()
#define SP <<" "<<
#define MOD 1000000007
#define IINF 1000000000
#define LINF 1000000000000000000

typedef long long LL;
typedef long double LD;

int main(){
  int h,w,a,b;
  cin >> h >> w >> a >> b;
  cout << h*w-(h/a*a)*(w/b*b) << endl;
  return 0;
}

