#include <stdio.h>
int main()
{
unsigned long n, m, a, width, height;
scanf("%lu%lu%lu", &n
, &m
, &a
); if (m % a == 0)
width = m / a;
else
width = m / a + 1;
if (n % a == 0)
height = n / a;
else
height = n / a + 1;
printf("%lu\n", width
* height
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiAKaW50IG1haW4oKQp7CiAgICAgICAgdW5zaWduZWQgbG9uZyBuLCBtLCBhLCB3aWR0aCwgaGVpZ2h0OwogCiAgICAgICAgc2NhbmYoIiVsdSVsdSVsdSIsICZuLCAmbSwgJmEpOwogICAgICAgIHByaW50ZigiJWx1ICVsdSAlbHUiLG4sbSxhKTsKICAgICAgICBpZiAobSAlIGEgPT0gMCkKICAgICAgICAgICAgICAgIHdpZHRoID0gbSAvIGE7CiAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgd2lkdGggPSBtIC8gYSArIDE7CiAKICAgICAgICBpZiAobiAlIGEgPT0gMCkKICAgICAgICAgICAgICAgIGhlaWdodCA9IG4gLyBhOwogICAgICAgIGVsc2UKICAgICAgICAgICAgICAgIGhlaWdodCA9IG4gLyBhICsgMTsKIAogICAgICAgIHByaW50ZigiJWx1XG4iLCB3aWR0aCAqIGhlaWdodCk7CiAKICAgICAgICByZXR1cm4gMDsKfQ==