#include <iostream>

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

   
    long long squares_in_n = (n + k - 1) / k;
    long long squares_in_m = (m + k - 1) / k;

    
    long long total_lights = squares_in_n * squares_in_m;

    std::cout << total_lights << std::endl;

    return 0;
}
