/*Shapaloki_Ochagi*/
#include "bits/stdc++.h"

using ll = long long;
using ld = long double;
using str = std::string;

signed main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);

    int n, m, k;
    std::cin >> n >> m >> k;

    std::cout << ceil(1. * n / k) * ceil(1. * m / k) << '\n';
    return 0;
}