#include<iostream>
using namespace std;
int main(){
    long long n,m,k;
    cin>>n>>m>>k;
    if(n % k != 0){
        n = n / k + 1;
    }
    else{
        n = n / k;
    }
    if(m % k != 0){
        m = m / k + 1;
    }
    else{
        m = m / k;
    }
    cout<<n * m;
}
