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