#include <iostream>
 
using namespace std;
 
int main() {
    long long n, m, k;
    cin >> n >> m >> k;
 
    long long lampsWidth = (n + k - 1) / k;
    long long lampsLength = (m + k - 1) / k;
    long long totalLamps = lampsWidth * lampsLength;
 
    cout << totalLamps << endl;
 
    return 0;
}