#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, n;
  cin >> a >> b >> n;
  long long c1, c2;
  c1 = a / n;
  c2 = b / n;
  if (a % n != 0) c1++;
  if (b % n != 0) c2++;
  cout << c1 * c2;
}
