#include <iostream>
#include <string>
#include <sstream>
int main() {
    std::string input;
    std::getline(std::cin, input);
    std::istringstream stream(input);
    int n, m, k;
    if (stream >> n >> m >> k) {
        int num_squares_n = (n + k - 1) / k;
        int num_squares_m = (m + k - 1) / k;
        int res = num_squares_n * num_squares_m;
        std::cout << res << std::endl;
    }
    return 0;
}