#include<bits/stdc++.h>
using namespace std;
int main(){
    long long n, m, k, s , s1;
    cin >> n >> m >> k;
    if(n % k != 0){
        s = (n / k) + 1;
    }
    if(n % k == 0){
        s = n / k;
    }
    if(m % k != 0){
        s1 = (m / k) + 1;
    }
    if(m % k == 0){
        s1 = m / k;
    }
    cout << s1 * s;

}
