#include <bits/stdc++.h>
 
using namespace std;
 
 
 
int main() {
 
    long long n, m;
    long long a;
    cin >> n >> m >> a;
    long long count = 0, count1 = 0;
 
    while (m > 0){
        m -= a;
        count++;
    }
 
    while (n > 0){
        n -= a;
        count1++;
    }
 
    cout << count * count1;
    return 0;
}
