#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a;
  long long x, y;
  while (cin >> n >> m >> a) {
    if (n / a == n / (double)a)
      x = n / a;
    else
      x = (int)(n / (double)a) + 1;
    if (m / a == m / (double)a)
      y = m / a;
    else
      y = (int)(m / (double)a) + 1;
    cout << x * y << endl;
  }
}
