#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n, m, a, ans;
  cin >> n >> m;
  cin >> a;
  if (a > m && a > n) {
    cout << 1;
  } else {
    if (m % a > 0)
      m = m / a + 1;
    else
      m = m / a;
    if (n % a > 0)
      n = n / a + 1;
    else
      n = n / a;
    ans = n * m;
    cout << ans;
  }
}
