#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 */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, m, k, i = 1, sum = 0;
  scanf("\n%d", &n);
  scanf("\n%d", &m);
  scanf("\n%d", &k);
  sum = m * k;
  for (; n > k; n = n - k) {
    sum = sum + (k * (m - (i * m * 2 / 100)));
    i++;
  }
  printf("%d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9c(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    11cd <main+0xad>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
imul   -0xc(%rbp),%eax
shl    $0x1,%eax
mov    $0x64,%esi
cltd
idiv   %esi
mov    -0x20(%rbp),%edx
mov    %eax,%esi
mov    -0x1c(%rbp),%eax
sub    %esi,%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1177 <main+0x57>
mov    -0x18(%rbp),%esi
lea    0xe2d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%r8d
mov    0x8(%rsp),%ecx
mov    %ecx,%esi
imul   %r8d,%esi
mov    0x4(%rsp),%edx
cmp    %ecx,%edx
jle    119c <main+0x7c>
mov    %r8d,%edi
nopl   (%rax)
movslq %edi,%rdi
imul   $0xffffffffae147ae1,%rdi,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x24,%rbx
add    %eax,%ebx
add    %r8d,%ebx
imul   %ecx,%ebx
add    %ebx,%esi
sub    %ecx,%edx
add    %r8d,%edi
cmp    %ecx,%edx
jg     1170 <main+0x50>
mov    %edx,0x4(%rsp)
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %5
store i32 0, i32* %6
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %4)
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
store i32 %12, i32* %6
br label %13
13: ; preds = %31, %0
%14 = load i32, i32* %2
%15 = load i32, i32* %4
%16 = icmp sgt i32 %14, %15
br i1 %16, label %17, label %35
17: ; preds = %13
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = load i32, i32* %5
%22 = load i32, i32* %3
%23 = mul nsw i32 %21, %22
%24 = mul nsw i32 %23, 2
%25 = sdiv i32 %24, 100
%26 = sub nsw i32 %20, %25
%27 = mul nsw i32 %19, %26
%28 = add nsw i32 %18, %27
store i32 %28, i32* %6
%29 = load i32, i32* %5
%30 = add nsw i32 %29, 1
store i32 %30, i32* %5
br label %31
31: ; preds = %17
%32 = load i32, i32* %2
%33 = load i32, i32* %4
%34 = sub nsw i32 %32, %33
store i32 %34, i32* %2
br label %13
35: ; preds = %13
%36 = load i32, i32* %6
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %36)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = mul nsw i32 %11, %10
%13 = load i32, i32* %1
%14 = icmp sgt i32 %13, %11
br i1 %14, label %15, label %28
15: ; preds = %0, %15
%16 = phi i32 [ %23, %15 ], [ %12, %0 ]
%17 = phi i32 [ %24, %15 ], [ 1, %0 ]
%18 = phi i32 [ %25, %15 ], [ %13, %0 ]
%19 = mul nsw i32 %17, %10
%20 = sdiv i32 %19, -50
%21 = add i32 %20, %10
%22 = mul nsw i32 %21, %11
%23 = add nsw i32 %22, %16
%24 = add nuw nsw i32 %17, 1
%25 = sub nsw i32 %18, %11
%26 = icmp sgt i32 %25, %11
br i1 %26, label %15, label %27
27: ; preds = %15
store i32 %25, i32* %1
br label %28
28: ; preds = %27, %0
%29 = phi i32 [ %23, %27 ], [ %12, %0 ]
%30 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %29)
ret i32 0
}