#include <bits/stdc++.h>

using namespace std;

int main(){
    int n, m, k;
    cin>>n>>m>>k;
    int sum = 0;
    if(n % k != 0){
        sum = n / k + 1;
    }
    else sum = n / k;
    if(m % k != 0) sum *=(m / k + 1);
    else sum *= (m / k);
    cout<<sum;
}

