#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <unordered_map>
#include <map>
#include <set>
#include <bitset>
#include <queue>
#include <stack>
#include <iomanip>
#include <fstream>
#include <deque>
#include <ctime>
#include <random>

#define int long long
#define ld long double
#define endl '\n'
#define fi first
#define se second
#define p_b push_back

using namespace std;

const int inf = 1e9 + 7;

main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n, m, k;
    cin >> n >> m >> k;
    int ans = ((n+k-1)/k)*((m+k-1)/k);
    cout << ans;

    return 0;
}
