//Only for _prince_
#include <iostream>
#import  <cmath>
#import <algorithm>
#import <string>
#import <set>
#import <vector>
#import <map>
#import <cstring>
#import <iomanip>
#import <fstream>
using namespace std;
using ull = unsigned long long int;
#define sz(x) int((x).size())
#define all(x) (x).begin(), (x).end()
#define endl '\n'
#define int long long
const int mod = 1e9+7;
void in(){
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
}
void result(){
    int n,m,k;
    cin >> n >> m >> k;
    if(n%k==0)n/=k;
    else n=n/k+1;
    if(m%k==0)m/=k;
    else m=m/k+1;
    cout << n*m;
}
signed main(){
    cin.tie(0)->sync_with_stdio(0);
    int r = 1;
    // cin >> r;
    while(r--) {
        result();
        cout << '\n';
    }
}
/*
  ╔═══╗╔═══╗╔══╗╔═╗─╔╗╔═══╗╔═══╗
  ║╔═╗║║╔═╗║╚╣─╝║║╚╗║║║╔═╗║║╔══╝
  ║╚═╝║║╚═╝║─║║─║╔╗╚╝║║║─╚╝║╚══╗
  ║╔══╝║╔╗╔╝─║║─║║╚╗║║║║─╔╗║╔══╝
  ║║───║║║╚╗╔╣─╗║║─║║║║╚═╝║║╚══╗
  ╚╝───╚╝╚═╝╚══╝╚╝─╚═╝╚═══╝╚═══╝
*/
