#include <bits/stdc++.h>

#define int long long
#define nl '\n'                                                                  
#define sz(s) (int)s.size()
#define pb push_back   
#define con continue
#define S second
#define F first
                                                                            
using namespace std;
            
const int N = (int)1e6 + 7;                                                                                     
const int inF = (int)-1e9 - 7;
const int INF = (int)1e18 + 7;                                                  
const int mod = 998244353;

void solve(){
	int n, m, k;
 	cin >> n >> m >>k;

 	int a = n / k, b = m / k;
 	
 	if(n % k != 0){
		a++;	        
 	}
 	if(m % k != 0){
		b++;	        
 	}
 	cout << a * b ;
}                                                                                           

signed main() {                                         
    
    int T = 1;
    //cin >> T;
	
    while(T--) {
    	solve();
    }
}