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