#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, a, cnt = 0, tmp;
  scanf("%lld%lld%lld", &n, &m, &a);
  cnt = (m / a) * (n / a);
  if (n % a != 0) cnt += (m / a);
  if (m % a != 0) cnt += (n / a);
  if (m % a != 0 && n % a != 0) cnt += 1;
  printf("%lld\n", cnt);
  return 0;
}
