#include <iostream>
#include <cmath>

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

    int count_n = std::ceil(static_cast<double>(n) / k);
    int count_m = std::ceil(static_cast<double>(m) / k);

    int result = count_n * count_m;
    std::cout << result << std::endl;

    return 0;
}


