#include <bits/stdc++.h>
using namespace std;
long long n, m, a, res1, res2;
int main() {
  cin >> n >> m >> a;
  res1 = m / a;
  if (res1 * a < m) res1++;
  res2 = n / a;
  if (res2 * a < n) res2++;
  cout << res1 * res2;
}
