#include <bits/stdc++.h>
#define junjunjojo ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define ll long long
#define pb push_back
#define popb pop_back
#define pf push_front
#define popf pop_front
using namespace std;

    int main(){

    ll n,m,k;

    cin>>n>>m>>k;

    ll a,b;

    a = (n + k - 1)/k;
    b = (m + k - 1)/k;

    cout<<a * b<<'\n';

    return 0;
}

