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

    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int a;
    int b;
    int c;
    cin >> a;
    cin >> b;
    cin >> c;
    cout << (a + c - 1) / c * ((b + c - 1) / c);

}
