50 50 50 50
 49 49 4 1
 48 50 12 11
 5 7 1 10
 1 50 50 50
 5 7 1 4
 32 4 17 3
 1 50 1 50
 50 1 1 1
 32 31 10 9
 5 7 4 1
 49 49 3 3
 50 49 1 2
 50 48 3 1
 50 1 1 50
 5 7 10 10
 1 1 1 1
 49 50 11 12

Second
 Second
 Second
 Second
 Second
 Second
 First
 Second
 First
 First
 Second
 Second
 First
 First
 First
 Second
 Second
 Second

#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, z, x, c;
  int n, m, a;
  int s1, s2;
  cin >> n >> m >> a;
  k = a;
  c = a;
  j = (m >= n ? m : n);
  z = (m <= n ? m : n);
  if (a < j) {
    for (i = 1; a < j; i++) {
      a = a + k;
    }
  } else
    i = 1;
  if (k < z) {
    for (x = 1; k < z; x++) {
      k = k + c;
    }
  } else
    x = 0;
  s1 = m * n;
  s2 = a * a;
  if (s2 > s1) {
    i = i + x;
  } else
    i = (s1 / (c * c));
  cout << " " << i << endl;
  return 0;
}
