#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long double n, m, a;
  cin >> n >> m >> a;
  long long answer = 0, hor, ver;
  hor = ceil(n / a);
  ver = ceil(m / a) - 1;
  ver = ver * hor;
  cout << hor + ver << endl;
  return 0;
}
