#include <iostream>
#include <string>
using namespace std;
int main()
{
 int h , w ;
 int n , m ,k;
 cin>>n>>m>>k;
 if(n%k==0){w=n/k;}
 else {w=n/k+1;}
 if(m%k==0){h=m/k;}
 else {h=m/k+1;}
 cout<<h*w;
}