#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
  ll n, m, k;
  cin >> n >> m >> k;

  ll rows = (n + k - 1) / k;
  ll cols = (m + k - 1) / k;
  ll total_lights = rows * cols;

  cout << total_lights << endl;
}
