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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xeb9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea9(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe99(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11fa <main+0xda>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    11a3 <main+0x83>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
cvtsi2ssl -0x1c(%rbp),%xmm2
movss  0xe46(%rip),%xmm3
divss  %xmm3,%xmm2
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
cvtsi2ssl -0x18(%rbp),%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    117b <main+0x5b>
mov    -0x18(%rbp),%esi
lea    0xe03(%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    0xee8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11ca <main+0xaa>
cvtsi2ssl 0x8(%rsp),%xmm0
mov    0x4(%rsp),%ecx
movaps 0xe94(%rip),%xmm1
xorps  %xmm0,%xmm1
xor    %ebx,%ebx
movss  0xe97(%rip),%xmm2
mov    $0x1,%r8d
xor    %esi,%esi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x2(%rbx),%edx
cmp    %ecx,%edi
cmovne %ebx,%edx
xorps  %xmm3,%xmm3
cvtsi2ss %edx,%xmm3
divss  %xmm2,%xmm3
mulss  %xmm1,%xmm3
xorps  %xmm4,%xmm4
cvtsi2ss %esi,%xmm4
addss  %xmm0,%xmm3
addss  %xmm3,%xmm4
cvttss2si %xmm4,%esi
lea    0x1(%rdi),%edi
cmove  %r8d,%edi
mov    %edx,%ebx
add    $0xffffffff,%eax
jne    1190 <main+0x70>
jmp    11cc <main+0xac>
xor    %esi,%esi
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%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
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%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 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
store i32 1, i32* %8
br label %12
12: ; preds = %39, %0
%13 = load i32, i32* %8
%14 = load i32, i32* %2
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %42
16: ; preds = %12
%17 = load i32, i32* %5
%18 = load i32, i32* %4
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 2
store i32 %22, i32* %7
store i32 0, i32* %5
br label %23
23: ; preds = %20, %16
%24 = load i32, i32* %3
%25 = sitofp i32 %24 to float
%26 = load i32, i32* %3
%27 = sitofp i32 %26 to float
%28 = load i32, i32* %7
%29 = sitofp i32 %28 to float
%30 = fdiv float %29, 1.000000e+02
%31 = fneg float %27
%32 = call float @llvm.fmuladd.f32(float %31, float %30, float %25)
%33 = load i32, i32* %6
%34 = sitofp i32 %33 to float
%35 = fadd float %34, %32
%36 = fptosi float %35 to i32
store i32 %36, i32* %6
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %39
39: ; preds = %23
%40 = load i32, i32* %8
%41 = add nsw i32 %40, 1
store i32 %41, i32* %8
br label %12
42: ; preds = %12
%43 = load i32, i32* %6
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %43)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%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 = load i32, i32* %1
%11 = icmp slt i32 %10, 1
br i1 %11, label %17, label %12
12: ; preds = %0
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to float
%16 = fneg float %15
br label %20
17: ; preds = %20, %0
%18 = phi i32 [ 0, %0 ], [ %33, %20 ]
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret i32 0
20: ; preds = %12, %20
%21 = phi i32 [ 1, %12 ], [ %36, %20 ]
%22 = phi i32 [ 0, %12 ], [ %27, %20 ]
%23 = phi i32 [ 0, %12 ], [ %33, %20 ]
%24 = phi i32 [ 0, %12 ], [ %35, %20 ]
%25 = icmp eq i32 %24, %13
%26 = add nsw i32 %22, 2
%27 = select i1 %25, i32 %26, i32 %22
%28 = sitofp i32 %27 to float
%29 = fdiv float %28, 1.000000e+02
%30 = call float @llvm.fmuladd.f32(float %16, float %29, float %15)
%31 = sitofp i32 %23 to float
%32 = fadd float %30, %31
%33 = fptosi float %32 to i32
%34 = add nsw i32 %24, 1
%35 = select i1 %25, i32 1, i32 %34
%36 = add nuw i32 %21, 1
%37 = icmp eq i32 %21, %10
br i1 %37, label %17, label %20
}