#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, a;
  cin >> n >> m >> a;
  long long int first = n / a;
  if (n % a != 0) first++;
  long long int second = m / a;
  if (m % a != 0) second++;
  cout << first * second;
  return 0;
}
