#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, s = 0;
  do {
    scanf("%d", &n);
    scanf("%d", &m);
    scanf("%d", &k);
  } while (k > n || k < 0 || m < 0 || n < 0);
  n = n - k;
  s = k * m;
  for (int i = 2; n - k >= 0; i += 2) {
    n = n - k;
    s = s + k * m * (100 - i) / 100;
  }
  printf("%d", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb3(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%ecx
mov    $0x1,%al
cmp    -0x8(%rbp),%ecx
mov    %al,-0x19(%rbp)
jg     119f <main+0x7f>
mov    $0x1,%al
cmpl   $0x0,-0x10(%rbp)
mov    %al,-0x19(%rbp)
jl     119f <main+0x7f>
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x19(%rbp)
jl     119f <main+0x7f>
cmpl   $0x0,-0x8(%rbp)
setl   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1136 <main+0x16>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
cmp    $0x0,%eax
jl     1214 <main+0xf4>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    $0x64,%ecx
sub    -0x18(%rbp),%ecx
imul   %ecx,%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    11c4 <main+0xa4>
mov    -0x14(%rbp),%esi
lea    0xde2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xece(%rip),%rbx
lea    0xc(%rsp),%r14
lea    0x14(%rsp),%r15
lea    0x10(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    0x10(%rsp),%r9d
test   %r9d,%r9d
js     1150 <main+0x30>
mov    0xc(%rsp),%esi
mov    %esi,%ecx
sub    %r9d,%ecx
jl     1150 <main+0x30>
mov    0x14(%rsp),%r8d
test   %r8d,%r8d
js     1150 <main+0x30>
test   %esi,%esi
js     1150 <main+0x30>
mov    %ecx,0xc(%rsp)
mov    %r8d,%esi
imul   %r9d,%esi
mov    %ecx,%edi
sub    %r9d,%edi
js     11e8 <main+0xc8>
imul   %r9d,%r8d
imul   $0x62,%r8d,%ebx
add    %r8d,%r8d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq %ebx,%rbx
imul   $0x51eb851f,%rbx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x25,%rdx
add    %eax,%edx
add    %edx,%esi
sub    %r9d,%ecx
sub    %r8d,%ebx
sub    %r9d,%edi
jns    11c0 <main+0xa0>
mov    %ecx,0xc(%rsp)
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\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 0, i32* %5
br label %7
7: ; preds = %24, %0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
br label %11
11: ; preds = %7
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = icmp sgt i32 %12, %13
br i1 %14, label %24, label %15
15: ; preds = %11
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 0
br i1 %17, label %24, label %18
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 0
br i1 %20, label %24, label %21
21: ; preds = %18
%22 = load i32, i32* %2
%23 = icmp slt i32 %22, 0
br label %24
24: ; preds = %21, %18, %15, %11
%25 = phi i1 [ true, %18 ], [ true, %15 ], [ true, %11 ], [ %23, %21 ]
br i1 %25, label %7, label %26
26: ; preds = %24
%27 = load i32, i32* %2
%28 = load i32, i32* %4
%29 = sub nsw i32 %27, %28
store i32 %29, i32* %2
%30 = load i32, i32* %4
%31 = load i32, i32* %3
%32 = mul nsw i32 %30, %31
store i32 %32, i32* %5
store i32 2, i32* %6
br label %33
33: ; preds = %51, %26
%34 = load i32, i32* %2
%35 = load i32, i32* %4
%36 = sub nsw i32 %34, %35
%37 = icmp sge i32 %36, 0
br i1 %37, label %38, label %54
38: ; preds = %33
%39 = load i32, i32* %2
%40 = load i32, i32* %4
%41 = sub nsw i32 %39, %40
store i32 %41, i32* %2
%42 = load i32, i32* %5
%43 = load i32, i32* %4
%44 = load i32, i32* %3
%45 = mul nsw i32 %43, %44
%46 = load i32, i32* %6
%47 = sub nsw i32 100, %46
%48 = mul nsw i32 %45, %47
%49 = sdiv i32 %48, 100
%50 = add nsw i32 %42, %49
store i32 %50, i32* %5
br label %51
51: ; preds = %38
%52 = load i32, i32* %6
%53 = add nsw i32 %52, 2
store i32 %53, i32* %6
br label %33
54: ; preds = %33
%55 = load i32, i32* %5
%56 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %55)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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*
br label %7
7: ; preds = %7, %0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %3
%12 = load i32, i32* %1
%13 = icmp slt i32 %12, %11
%14 = icmp slt i32 %11, 0
%15 = or i1 %14, %13
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 0
%18 = select i1 %15, i1 true, i1 %17
%19 = icmp slt i32 %12, 0
%20 = select i1 %18, i1 true, i1 %19
br i1 %20, label %7, label %21
21: ; preds = %7
%22 = sub nsw i32 %12, %11
store i32 %22, i32* %1
%23 = mul nsw i32 %16, %11
%24 = sub nsw i32 %22, %11
%25 = icmp sgt i32 %24, -1
br i1 %25, label %30, label %27
26: ; preds = %30
store i32 %31, i32* %1
br label %27
27: ; preds = %26, %21
%28 = phi i32 [ %37, %26 ], [ %23, %21 ]
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
ret i32 0
30: ; preds = %21, %30
%31 = phi i32 [ %39, %30 ], [ %24, %21 ]
%32 = phi i32 [ %38, %30 ], [ 2, %21 ]
%33 = phi i32 [ %37, %30 ], [ %23, %21 ]
%34 = sub nsw i32 100, %32
%35 = mul nsw i32 %34, %23
%36 = sdiv i32 %35, 100
%37 = add nsw i32 %36, %33
%38 = add nuw nsw i32 %32, 2
%39 = sub nsw i32 %31, %11
%40 = icmp sgt i32 %39, -1
br i1 %40, label %30, label %26
}