#include <bits/stdc++.h>
using namespace std;
void c_p_c() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  double m, n, a;
  cin >> m >> n >> a;
  cout << (long long)ceil(m / a) * (long long)ceil(n / a);
  return 0;
}
