#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a;
  while (cin >> n >> m >> a) {
    long long row, column;
    row = n / a + (n % a == 0 ? 0 : 1);
    column = m / a + (m % a == 0 ? 0 : 1);
    cout << row * column << endl;
  }
  return 0;
}
