#include <bits/stdc++.h>
int main(void) {
  double n, m, a, t1, t2;
  long long int total;
  scanf("%lf %lf %lf", &n, &m, &a);
  if ((m <= 0) || (a <= 0)) {
    printf("0");
    return 0;
  }
  if ((a >= n) && (a >= m)) {
    printf("1");
    return 0;
  }
  total = ceil(n / a) * ceil(m / a);
  printf("%lld", total);
  return 0;
}
