#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, i, m, k, z = 0, sum = 0;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  for (i = 0; i < n; i++) {
    sum += m;
    z++;
    if (z == k) {
      m = m - ((m * 2) / 100.0);
      z = 0;
    }
  }
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xec4(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb4(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea4(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11de <main+0xbe>
mov    -0x10(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    11cb <main+0xab>
cvtsi2sdl -0x10(%rbp),%xmm0
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe4b(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    11d0 <main+0xb0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1174 <main+0x54>
mov    -0x1c(%rbp),%esi
lea    0xe20(%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    0xedc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    11b7 <main+0x97>
mov    0x4(%rsp),%edx
xor    %esi,%esi
mov    0x8(%rsp),%ecx
movsd  0xe93(%rip),%xmm0
xor    %edi,%edi
jmp    1189 <main+0x69>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %edx,%esi
mov    %ebx,%edx
add    $0xffffffff,%eax
je     11b9 <main+0x99>
add    $0x1,%edi
mov    %edx,%ebx
cmp    %ecx,%edi
jne    1180 <main+0x60>
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
lea    (%rdx,%rdx,1),%edi
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
divsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
cvttsd2si %xmm2,%ebx
mov    %ebx,0x4(%rsp)
xor    %edi,%edi
jmp    1180 <main+0x60>
xor    %esi,%esi
lea    0xe48(%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"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %6
store i32 0, i32* %7
%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* %4)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
store i32 0, i32* %3
br label %11
11: ; preds = %34, %0
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %37
15: ; preds = %11
%16 = load i32, i32* %4
%17 = load i32, i32* %7
%18 = add nsw i32 %17, %16
store i32 %18, i32* %7
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = load i32, i32* %5
%23 = icmp eq i32 %21, %22
br i1 %23, label %24, label %33
24: ; preds = %15
%25 = load i32, i32* %4
%26 = sitofp i32 %25 to double
%27 = load i32, i32* %4
%28 = mul nsw i32 %27, 2
%29 = sitofp i32 %28 to double
%30 = fdiv double %29, 1.000000e+02
%31 = fsub double %26, %30
%32 = fptosi double %31 to i32
store i32 %32, i32* %4
store i32 0, i32* %6
br label %33
33: ; preds = %24, %15
br label %34
34: ; preds = %33
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %11
37: ; preds = %11
%38 = load i32, i32* %7
%39 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %38)
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*
%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 sgt i32 %10, 0
br i1 %11, label %12, label %35
12: ; preds = %0
%13 = load i32, i32* %2
%14 = load i32, i32* %3
br label %15
15: ; preds = %12, %30
%16 = phi i32 [ 0, %12 ], [ %20, %30 ]
%17 = phi i32 [ 0, %12 ], [ %32, %30 ]
%18 = phi i32 [ 0, %12 ], [ %33, %30 ]
%19 = phi i32 [ %13, %12 ], [ %31, %30 ]
%20 = add nsw i32 %19, %16
%21 = add nsw i32 %17, 1
%22 = icmp eq i32 %21, %14
br i1 %22, label %23, label %30
23: ; preds = %15
%24 = sitofp i32 %19 to double
%25 = shl nsw i32 %19, 1
%26 = sitofp i32 %25 to double
%27 = fdiv double %26, 1.000000e+02
%28 = fsub double %24, %27
%29 = fptosi double %28 to i32
store i32 %29, i32* %2
br label %30
30: ; preds = %15, %23
%31 = phi i32 [ %29, %23 ], [ %19, %15 ]
%32 = phi i32 [ 0, %23 ], [ %21, %15 ]
%33 = add nuw nsw i32 %18, 1
%34 = icmp eq i32 %33, %10
br i1 %34, label %35, label %15
35: ; preds = %30, %0
%36 = phi i32 [ 0, %0 ], [ %20, %30 ]
%37 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %36)
ret i32 0
}