#include <bits/stdc++.h>
using namespace std;

int main() {
    long long a,b,c;
    cin >>a>>b>>c;
   	long long int nuris_a = ceil(static_cast<double>(a) / c);
    long long int ilikko_b = ceil(static_cast<double>(b) / c);
    long long int total_alish = nuris_a * ilikko_b;
	cout <<total_alish<<endl;
}