#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define el << "\n"
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
ll n,m,a;
cin>>n>>m>>a;
cout<<((n+a-1)/a)*((m+a-1)/a);
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnR5cGVkZWYgbG9uZyBsb25nIGxsOwojZGVmaW5lIGVsIDw8ICJcbiIKIAppbnQgbWFpbigpIHsKaW9zOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwpjaW4udGllKG51bGxwdHIpOwpjb3V0LnRpZShudWxscHRyKTsKICBsbCBuLG0sYTsKICBjaW4+Pm4+Pm0+PmE7CiAgY291dDw8KChuK2EtMSkvYSkqKChtK2EtMSkvYSk7CiAgcmV0dXJuIDA7Cn0=