#include <bits/stdc++.h>
#define first f
#define second s

using namespace std;

long long  a,b , i, j,n,m,k;
int main()
{
    cin >> n >> m >> k;
    cout << ((n+k-1)/k)*((m+k-1)/k)<<"\n";
    return 0;
}
