#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define int long long
#define ll long long
#define f first
#define s second
#define pb push_back
#define sz(x) (int) x.size()
#define all(x) begin(x), end(x)
using namespace std;

const int N = 2e5 + 1, inf = LLONG_MAX / 2ll ;

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

signed main() {
    ios_base::sync_with_stdio(NULL);
    cin.tie(0);cout.tie(0);
    int T = 1 ;
    while (T--) {
        solve ( ) ;
    }
    return 0 ;
}