#include<bits/stdc++.h>
using namespace std;
int main(){
    long long n, m, k;
    scanf("%lld %lld %lld", &n, &m, &k);
    long long ans = (n / k + (n % k != 0)) * (m / k + (m % k != 0));
    cout<<ans;
}