///In the name of Allah, the most Gracious and the most Merciful.
#include<bits/stdc++.h>
#define fr first
#define sc second
#define ll long long
#define pb push_back
#define no cout<<"NO"<<endl
#define yes cout<<"YES"<<endl
#define IShowSpeed ios_base::sync_with_stdio(0) ; cin.tie(0) ;
using namespace std ;

ll n , m , a , b , k , x , y , ans , cnt , sum , mid;
vector < ll > v , v1 , vv ;
map < ll , ll > mp ;
string s , s1 , ss ;
deque < ll > d ;

void mercurii()
{
    cin >> n >> m >> k;

     ans = ceil(static_cast<double>(n) / k);
     cnt = ceil(static_cast<double>(m) / k);

    long long total_lights = ans * cnt;

    cout << total_lights << '\n';
}
/**
    So remember me , I will remember you [ Quran 2:152 ]
**/
int main()
{
    IShowSpeed
    ll t = 1 ;
    ///cin >> t ;
    while ( t -- )
    {
        mercurii() ;
    }
}
