#include <bits/stdc++.h>
using namespace std;
int main() {
int m,n,a;
cin >> m >> n >> a;
cout << (m+a-1)/a * (n+a-1)/a;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCBtLG4sYTsKCWNpbiA+PiBtID4+IG4gPj4gYTsKCWNvdXQgPDwgKG0rYS0xKS9hICogKG4rYS0xKS9hOwoJcmV0dXJuIDA7Cn0=