#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}

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

