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