#include <bits/stdc++.h>
int main() {
  long long int m, n, a;
  while (~scanf("%lld%lld%lld", &m, &n, &a)) {
    long long k, l;
    k = (m + a - 1) / a;
    l = (n + a - 1) / a;
    printf("%lld\n", k * l);
  }
  return 0;
}
