#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  long long int m, n, a, tol, arz;
  cin >> m;
  cin >> n;
  cin >> a;
  if (m % a == 0) {
    tol = m / a;
  } else {
    tol = (m / a) + 1;
  }
  if (n % a == 0) {
    arz = n / a;
  } else {
    arz = (n / a) + 1;
  }
  long long int temp;
  temp = tol * arz;
  cout << temp;
  return 0;
}
