#include <bits/stdc++.h>
#include <set>
#include <map>
#include <vector>
#include <cmath>
using namespace std;
#define ll long long
#define ld long double
#define f first
#define s second
#define pb push_back
#define mk make_pair
#define WHAT ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define cin(x, N) for(int i = 1; i <= N; i ++) cin >> x[i]
#define reset(x, N) for(int i = 1; i <= N; i ++) x[i] = 0;
#define sortvec(x) sort(x.begin(), x.end())
#define open_file(intput, output) freopen("input","r",stdin);freopen("output","w",stdout)
void solve(){}
int main(){
    WHAT
    ll N, M, K;
    cin >> N >> M >> K;
    cout << (N / K + int(N % K != 0)) * (M / K + int(M % K != 0));
}