#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <numeric>
#include <string>
#include <set>
#include <iomanip>
#include <stack>
#include <cctype>

using namespace std;
#define ll long long
#define ld long double
#define print(a) for (auto i: a){cout << i << " ";}cout << endl;
#define dprint(a) for (ll i = 0; i < a.size(); i++){ cout << i << ": ";for(auto j: a[i]){cout << j << "\t";}cout << endl;}cout << endl;
#define open(name_input, name_output) freopen(name_input, "r", stdin); freopen(name_output, "w", stdout);
#define input(a, n) for(ll i = 1; i <= n; i++){cin>>a[i];}
#define tests ll number_of_tests; cin>>number_of_tests; while(number_of_tests--)
#define slprint(sl) for(auto i: sl){ cout << i.first << " " << i.second << endl;}
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n, m, k;
    cin >> n >> m >> k;
    cout << ((n+k-1)/k)*((m+k-1)/k);
}




