#include <iostream>
 
using namespace std;
 
int main()
{
    int n,m,k,a,b,c,d,f;
    cin>>n>>m>>k;
    a=n*m;
    b=k*k;
    if(1<=n,m,k<=1000000000)
            if(n%k==0 and m%k==0){
                cout<<a/b<<endl;
            }else{
                 if(n%k!=0 and m%k!=0){
                d=(m/k)*(n/k)+(n/k)+(m/k)+1;
             
                cout<<d;}
                else{
                if(n%k==0){
                    c=n/k;}
                    else if(m%k==0){
                        c=m/k;
                    }
                f=(n/k)*(m/k)+c;
                cout<<f;
            
            }
         
            }
         
        }