#include <bits/stdc++.h>
#include <set>
#include <vector>
#include <queue>
 
#define pb push_back
#define ll long long
#define f first
#define s second

const ll int INF = 1e18, inf = 1e9, mod = 1e9 + 7;


using namespace std;




int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	int n, m, ans, l, r;

	cin>>n>>m>>k;

	cout<<(n / k) * (m / k);
}
