#include <iostream>
using namespace std;

int max_carpet_area(int h, int w, int n, int m) {
    int max_height = h / n;
    int max_width = w / m;
    return max_height * max_width * n * m;
}

int main() {
    int h, w, n, m;
    cin >> h >> w >> n >> m;

    int result = max_carpet_area(h, w, n, m);

    cout << result << endl;

    return 0;
}

