#include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<vector>
#include<set>
#include<queue>
#include<map>

#define ll long long
#define pb push_back
#define ppb pop_back
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

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