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