#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
const int ST = 100010;
const int ST1 = 1000010;
const long long MOD = 1000000007;
long long ABS(long long a) {
  if (a < 0)
    return a * (-1);
  else
    return a;
}
int main() {
  long long n, m, k;
  cin >> n >> m >> k;
  long long ans = 0;
  ans = ((n + k - 1) / k) * ((m + k - 1) / k);
  cout << ans;
}
