#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ EOF;
int ceil(double);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, double *, double *, double *);
int main() {
  double n, m, a;
  while (scanf("%lf%lf%lf", &n, &m, &a) != EOF) {
    printf("%.0lf\n", ceil(n / a) * ceil(m / a));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <scanf@plt>
mov    0x2e8a(%rip),%rcx
cmp    (%rcx),%rax
je     119f <main+0x6f>
movsd  -0x10(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1030 <ceil@plt>
mov    %eax,-0x24(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1030 <ceil@plt>
mov    -0x24(%rbp),%esi
imul   %eax,%esi
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebb(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1050 <scanf@plt>
mov    0x2e8a(%rip),%r14
cmp    (%r14),%rax
je     11c9 <main+0x99>
lea    0xe96(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%r13
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
movsd  0x10(%rsp),%xmm0
divsd  (%rsp),%xmm0
call   1030 <ceil@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
divsd  (%rsp),%xmm0
call   1030 <ceil@plt>
imul   %eax,%ebp
lea    0xe5e(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1050 <scanf@plt>
cmp    (%r14),%rax
jne    1180 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lf%lf%lf\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.0lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
br label %5
5: ; preds = %9, %0
%6 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%7 = load i64, i64* @EOF
%8 = icmp ne i64 %6, %7
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load double, double* %2
%11 = load double, double* %4
%12 = fdiv double %10, %11
%13 = call i32 @ceil(double %12)
%14 = load double, double* %3
%15 = load double, double* %4
%16 = fdiv double %14, %15
%17 = call i32 @ceil(double %16)
%18 = mul nsw i32 %13, %17
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %5
20: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lf%lf%lf\00"
@EOF = global i64 0
@.str.1 = [7 x i8] c"%.0lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %24, label %10
10: ; preds = %0, %10
%11 = load double, double* %1
%12 = load double, double* %3
%13 = fdiv double %11, %12
%14 = call i32 @ceil(double %13)
%15 = load double, double* %2
%16 = load double, double* %3
%17 = fdiv double %15, %16
%18 = call i32 @ceil(double %17)
%19 = mul nsw i32 %18, %14
%20 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = call i64 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%22 = load i64, i64* @EOF
%23 = icmp eq i64 %21, %22
br i1 %23, label %24, label %10
24: ; preds = %10, %0
ret i32 0
}