#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    int m,n,k;
    cin >> m >> n >> k;
        if(m % k != 0){
               m = ((m/k)+1)*k;
               
        }
   if(n % k != 0){
               n = ((n/k)+1)*k;
               
        }
    cout << (m/k) * (n/k);
}
