#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int aa = a / c, bb = b / c;
  if (a % c != 0) aa++;
  if (b % c != 0) bb++;
  cout << aa * bb;
}
