#include <bits/stdc++.h>
using namespace std;
long long n, m, a, r = 1, c;
int main() {
  cin >> n >> m >> a;
  n -= a;
  c = (m % a == 0 ? m / a : m / a + 1);
  r += (n > 0 ? (n % a == 0 ? n / a : n / a + 1) : 0);
  cout << r * c;
  return 0;
}
