#include <iostream>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a = n / k;
  int b = m / k;
  if (n % k != 0) a++;
  if (m % k != 0) b++;
  cout << a * b;
  return 0;
}