#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <bitset>

template<typename T>
bool rMin(T& a, const T& b){
    if(b < a){
        a = b;
        return true;
    }
    return false;
}

template<typename T>
bool rMax(T& a, const T& b){
    if(a < b){
        a = b;
        return true;
    }
    return false;
}


using namespace std;

void solve(){
    int a, b, c;
    cin >> a >> b >> c;
    if(a % c != 0) a += c;
    if(b % c != 0) b += c;
    cout << (long long)(a / c) * (b / c);
}

int main(){
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    int t = 1;

    //cin >> t;

    for(int i = 0; i < t; ++i){
        solve();
    }
}