#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a, i = 0;
  cin >> n >> m >> a;
  long long horiz = 1;
  long long vert = 1;
  while (a < n) {
    n -= a;
    horiz++;
  }
  while (a < m) {
    m -= a;
    vert++;
  }
  cout << horiz * vert;
  return 0;
}
