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