#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, ac, bc, abc;
  cin >> a >> b >> c;
  if (a % c == 0) {
    ac = a / c;
  } else
    ac = a / c + 1;
  if (b % c == 0) {
    bc = b / c;
  } else
    bc = b / c + 1;
  abc = ac * bc;
  cout << abc;
}
