#include<bits/stdc++.h>
#define yes cout << "YES" << endl;
#define no cout << "NO" << endl;
#define pb push_back
using namespace std;
void solve(){
    int a,b,c,d,v;
    cin >> a >> b >>c;
    if (a%c==0)d = a/c;
    else d = (a/c)+1;
    if (b%c==0)v = b/c;
    else v = (b/c)+1;
    cout << d*v;
}
int main()
{
//    int t;
//    cin >> t;
//    while(t--)
        solve();
}
