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