#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d, t, i, sum = 0, j = 1, k, x = 0, y = 0;
  cin >> a >> b >> c;
  if (a * b <= c * c)
    sum = 1;
  else {
    if (a % c == 0)
      x = a / c;
    else
      x = (a / c) + 1;
    if (b % c == 0)
      y = b / c;
    else
      y = (b / c) + 1;
    sum = x * y;
  }
  cout << sum << endl;
  return 0;
}
