#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 main() {
  int n, s = 0, sm = 0, m, i;
  float k;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%f", &k);
  k = k * 0.01;
  sm = m;
  for (i = 0; i < n; i++) {
    if (i != 0)
      if (i % 2 == 0) {
        sm = sm - sm * k;
      }
    s = s + (m - (sm * k));
  }
  printf("%d", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec4(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb2(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea3(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe7c(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    123a <main+0x11a>
cmpl   $0x0,-0x18(%rbp)
je     11f8 <main+0xd8>
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11f3 <main+0xd3>
cvtsi2ssl -0x10(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
jmp    11f8 <main+0xd8>
cvtsi2ssl -0xc(%rbp),%xmm0
cvtsi2ssl -0x14(%rbp),%xmm2
cvtsi2ssl -0x10(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm3
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119e <main+0x7e>
mov    -0xc(%rbp),%esi
lea    0xdc4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xeda(%rip),%r14
xor    %ebx,%ebx
lea    0x14(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeb6(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe8d(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
mov    0x14(%rsp),%eax
test   %eax,%eax
jle    11eb <main+0xcb>
mov    0x10(%rsp),%edx
cvtsi2ss %edx,%xmm1
xor    %ecx,%ecx
xor    %ebx,%ebx
jmp    11c8 <main+0xa8>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm2,%xmm2
cvtsi2ss %ebx,%xmm2
xorps  %xmm3,%xmm3
cvtsi2ss %edx,%xmm3
mulss  %xmm0,%xmm3
movaps %xmm1,%xmm4
subss  %xmm3,%xmm4
addss  %xmm2,%xmm4
cvttss2si %xmm4,%ebx
add    $0x1,%ecx
cmp    %ecx,%eax
je     11eb <main+0xcb>
test   %ecx,%ecx
je     11a0 <main+0x80>
mov    %ecx,%esi
and    $0x1,%esi
jne    11a0 <main+0x80>
xorps  %xmm2,%xmm2
cvtsi2ss %edx,%xmm2
movaps %xmm2,%xmm3
mulss  %xmm0,%xmm3
subss  %xmm3,%xmm2
cvttss2si %xmm2,%edx
jmp    11a0 <main+0x80>
lea    0xe16(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %4
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %7)
%11 = load float, float* %7
%12 = fpext float %11 to double
%13 = fmul double %12, 1.000000e-02
%14 = fptrunc double %13 to float
store float %14, float* %7
%15 = load i32, i32* %5
store i32 %15, i32* %4
store i32 0, i32* %6
br label %16
16: ; preds = %49, %0
%17 = load i32, i32* %6
%18 = load i32, i32* %2
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %52
20: ; preds = %16
%21 = load i32, i32* %6
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %37
23: ; preds = %20
%24 = load i32, i32* %6
%25 = srem i32 %24, 2
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %36
27: ; preds = %23
%28 = load i32, i32* %4
%29 = sitofp i32 %28 to float
%30 = load i32, i32* %4
%31 = sitofp i32 %30 to float
%32 = load float, float* %7
%33 = fneg float %31
%34 = call float @llvm.fmuladd.f32(float %33, float %32, float %29)
%35 = fptosi float %34 to i32
store i32 %35, i32* %4
br label %36
36: ; preds = %27, %23
br label %37
37: ; preds = %36, %20
%38 = load i32, i32* %3
%39 = sitofp i32 %38 to float
%40 = load i32, i32* %5
%41 = sitofp i32 %40 to float
%42 = load i32, i32* %4
%43 = sitofp i32 %42 to float
%44 = load float, float* %7
%45 = fneg float %43
%46 = call float @llvm.fmuladd.f32(float %45, float %44, float %41)
%47 = fadd float %39, %46
%48 = fptosi float %47 to i32
store i32 %48, i32* %3
br label %49
49: ; preds = %37
%50 = load i32, i32* %6
%51 = add nsw i32 %50, 1
store i32 %51, i32* %6
br label %16
52: ; preds = %16
%53 = load i32, i32* %3
%54 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %53)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fmul double %11, 1.000000e-02
%13 = fptrunc double %12 to float
store float %13, float* %3
%14 = load i32, i32* %2
%15 = load i32, i32* %1
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %42
17: ; preds = %0
%18 = sitofp i32 %14 to float
br label %19
19: ; preds = %17, %32
%20 = phi i32 [ 0, %17 ], [ %40, %32 ]
%21 = phi i32 [ %14, %17 ], [ %33, %32 ]
%22 = phi i32 [ 0, %17 ], [ %39, %32 ]
%23 = icmp ne i32 %20, 0
%24 = and i32 %20, 1
%25 = icmp eq i32 %24, 0
%26 = and i1 %23, %25
br i1 %26, label %27, label %32
27: ; preds = %19
%28 = sitofp i32 %21 to float
%29 = fneg float %28
%30 = call float @llvm.fmuladd.f32(float %29, float %13, float %28)
%31 = fptosi float %30 to i32
br label %32
32: ; preds = %27, %19
%33 = phi i32 [ %31, %27 ], [ %21, %19 ]
%34 = sitofp i32 %22 to float
%35 = sitofp i32 %33 to float
%36 = fneg float %35
%37 = call float @llvm.fmuladd.f32(float %36, float %13, float %18)
%38 = fadd float %37, %34
%39 = fptosi float %38 to i32
%40 = add nuw nsw i32 %20, 1
%41 = icmp eq i32 %40, %15
br i1 %41, label %42, label %19
42: ; preds = %32, %0
%43 = phi i32 [ 0, %0 ], [ %39, %32 ]
%44 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %43)
ret i32 0
}