#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 m, k, p = 0, n, s, pr = 0;
  scanf("%d", &m);
  scanf("%d", &n);
  scanf("%d", &k);
  for (s = n; m > 1; m--) {
    p++;
    if (p % k == 0)
      pr = pr + 2;
    s = s + n - (n * pr / 100);
  }
  printf("%d", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9c(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    11cf <main+0xaf>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    119f <main+0x7f>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x1c(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1173 <main+0x53>
mov    -0x18(%rbp),%esi
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%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    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%edi
mov    0x4(%rsp),%r9d
cmp    $0x2,%r9d
jl     11b1 <main+0x91>
xor    %ebx,%ebx
mov    $0x1,%ecx
mov    0xc(%rsp),%r8d
mov    %edi,%esi
mov    %ecx,%eax
cltd
idiv   %r8d
lea    0x2(%rbx),%eax
test   %edx,%edx
cmovne %ebx,%eax
mov    %esi,%edx
add    %edi,%edx
mov    %eax,%ebx
imul   %edi,%eax
cltq
imul   $0xffffffffae147ae1,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x25,%rsi
add    %eax,%esi
add    %edx,%esi
add    $0x1,%ecx
cmp    %ecx,%r9d
jne    1170 <main+0x50>
movl   $0x1,0x4(%rsp)
jmp    11b3 <main+0x93>
mov    %edi,%esi
lea    0xe46(%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* %4
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* %5)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %5
store i32 %11, i32* %6
br label %12
12: ; preds = %34, %0
%13 = load i32, i32* %2
%14 = icmp sgt i32 %13, 1
br i1 %14, label %15, label %37
15: ; preds = %12
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = srem i32 %18, %19
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %15
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 2
store i32 %24, i32* %7
br label %25
25: ; preds = %22, %15
%26 = load i32, i32* %6
%27 = load i32, i32* %5
%28 = add nsw i32 %26, %27
%29 = load i32, i32* %5
%30 = load i32, i32* %7
%31 = mul nsw i32 %29, %30
%32 = sdiv i32 %31, 100
%33 = sub nsw i32 %28, %32
store i32 %33, i32* %6
br label %34
34: ; preds = %25
%35 = load i32, i32* %2
%36 = add nsw i32 %35, -1
store i32 %36, i32* %2
br label %12
37: ; preds = %12
%38 = load i32, i32* %6
%39 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %38)
%40 = load i32, i32* %1
ret i32 %40
}

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* %3)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %3
%11 = load i32, i32* %1
%12 = icmp sgt i32 %11, 1
br i1 %12, label %13, label %31
13: ; preds = %0
%14 = load i32, i32* %2
%15 = add nsw i32 %11, -1
br label %16
16: ; preds = %13, %16
%17 = phi i32 [ 0, %13 ], [ %24, %16 ]
%18 = phi i32 [ %10, %13 ], [ %28, %16 ]
%19 = phi i32 [ 0, %13 ], [ %20, %16 ]
%20 = add nuw nsw i32 %19, 1
%21 = srem i32 %20, %14
%22 = icmp eq i32 %21, 0
%23 = add nsw i32 %17, 2
%24 = select i1 %22, i32 %23, i32 %17
%25 = add nsw i32 %18, %10
%26 = mul nsw i32 %24, %10
%27 = sdiv i32 %26, -100
%28 = add i32 %25, %27
%29 = icmp eq i32 %20, %15
br i1 %29, label %30, label %16
30: ; preds = %16
store i32 1, i32* %1
br label %31
31: ; preds = %30, %0
%32 = phi i32 [ %28, %30 ], [ %10, %0 ]
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
ret i32 0
}