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