summaryrefslogtreecommitdiff
path: root/1A/main.cpp
blob: d4a9bbdeee72641f5d289f131555203ac0cdb25f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

using namespace std;

int main() {
        long long a,b,c;
        cin>>a>>b>>c;
        
        long long widthwise = a / c; 
        if(a % c != 0){
                widthwise++;
        }
        long long lengthwise = b / c;
        if(b % c != 0){
                lengthwise++;
        }
        long long result = lengthwise*widthwise; 
        cout<<result;

        return 0;
}