#include<bits/stdc++.h> using namespace std; int main() { int a,b,c;//n,m,a cin>>a>>b>>c; int q,w; if (a%c==0)q=a/c; else q=a/c+1; if (b%c==0)w=b/c; else w=b/c+1; cout<<q*w<<endl; return 0; }