#include <bits/stdc++.h>
using LL = long long;
const LL MOD = 1e9+9;
using namespace std;



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

