#include <bits/stdc++.h>
int main() {
  long long m, n, a, p, q, r, s;
  scanf("%I64d", &m);
  scanf("%I64d", &n);
  scanf("%I64d", &a);
  if (m % a == 0) {
    p = m / a;
  } else {
    p = (m / a) + 1;
  }
  if (n % a == 0) {
    q = n / a;
  } else {
    q = (n / a) + 1;
  }
  s = p * q;
  printf("%I64d", s);
  return 0;
}
