#include <bits/stdc++.h>
using namespace std;
int main(){

    int a;
    int b;
    int c;
    cin >> a;
    cin >> b;
    cin >> c;
    int ans = (a + c - 2 + 1) / c * ((b + c - 1) / c);
    cout << ans;

}
