//#include <bits/stdc++.h>
#include <stdio.h>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <random>
#include <chrono>
/*
Bismillah hir rahman nir raheem
*/
using namespace std;
#define ll long long
#define ull unsigned long long 
#define pb(e) push_back(e)
#define mp(a,b) make_pair(a,b)
#define all(x) x.begin(),x.end()
const unsigned long long INF = 1e5 * 2;





ull binpow(ull a, ull b)
{
    if (b == 0)
    {
        return 1;
    }
    else if (b % 2 == 1)
    {
        return binpow(a, b - 1) * a;
    }
    else
    {
        ll n = binpow(a, b / 2) % INF;
        return (n * n) % INF;
    }
}



double log_b_n(int base, int n)
{
    return log(n) / log(base);
}

// distance between two cordinates x1, y1 and x2, y2;
double distance (double x, double y, double x1, double y1)
{
    return sqrt(pow((x - x1),2) + pow((y - y1),2));
}
 
int prefix( int n ){
    int r = 0;
    for (int i = 1; i <= n; ++i ){
        r += i;
    }
    return r;
}
int euclid( ll a, ll b ) // алгортим ЕВКЛИДА ДЛЯ НАХОЖДЕНИЯ НОД
{
    if ( a != 0 && b != 0 )
    {
        if ( a > b )
        {
            a %= b;
        }
        else
        {
            b %= a;
        }
        return euclid( a, b );
    }
    return a + b;
}

bool checkPrimeNumber(ll n) {
    bool isPrimeNumber = true;
    // 0 и 1 не являются простыми числами 
    if (n == 0 || n == 1) {
        isPrimeNumber = false;
    }
    else {
        for (int i = 2; i * i< n; ++i) {
            if (n % i == 0 && i != 0 && n - i != 0) {
                return false;
            }
        }
    }
    return isPrimeNumber;
}

void solve()
{
    int n, m, k;
    cin >> n >> m >> k;
    cout << (n + (k - 1) ) / k * (m + (k - 1) ) / k;
}


int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1; 
    while (t--)
    {
        solve();
        cout << endl;
    }
    return 0;
}