import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric;

void main()
{
    auto hw = readln.split.to!(int[]);
    auto h = hw[0];
    auto w = hw[1];
    auto ab = readln.split.to!(int[]);
    auto a = ab[0];
    auto b = ab[1];
    writeln(h * w - (h / a) * (w / b) * a * b);
}
