#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, promo = 0, cena = 0, broi = 0;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  while (broi < n) {
    promo = m - (broi / k * (2 * m / 100));
    cena = cena + promo;
    broi = broi + 1;
  }
  printf("%d", cena);
  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    0xeb5(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xea5(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe95(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c1 <main+0xa1>
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    $0x64,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x20(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1174 <main+0x54>
mov    -0x18(%rbp),%esi
lea    0xe35(%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    0xed4(%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),%r10d
test   %r10d,%r10d
jle    1187 <main+0x67>
movslq 0x8(%rsp),%r8
mov    0x4(%rsp),%r9d
imul   $0xffffffffae147ae1,%r8,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x24,%rbx
add    %eax,%ebx
cmp    $0x1,%r10d
jne    118b <main+0x6b>
xor    %ecx,%ecx
xor    %esi,%esi
jmp    11c7 <main+0xa7>
xor    %esi,%esi
jmp    11db <main+0xbb>
mov    %r10d,%r11d
and    $0xfffffffe,%r11d
xor    %ecx,%ecx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%eax
cltd
idiv   %r9d
mov    %eax,%edi
add    %r8d,%esi
lea    0x1(%rcx),%eax
imul   %ebx,%edi
cltd
idiv   %r9d
imul   %ebx,%eax
add    %edi,%esi
add    %r8d,%esi
add    %eax,%esi
add    $0x2,%ecx
cmp    %r11d,%ecx
jne    11a0 <main+0x80>
test   $0x1,%r10b
je     11db <main+0xbb>
mov    %ecx,%eax
cltd
idiv   %r9d
imul   %ebx,%eax
add    %r8d,%esi
add    %eax,%esi
lea    0xe1e(%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* %5
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* %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 = %15, %0
%12 = load i32, i32* %7
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %30
15: ; preds = %11
%16 = load i32, i32* %3
%17 = load i32, i32* %7
%18 = load i32, i32* %4
%19 = sdiv i32 %17, %18
%20 = load i32, i32* %3
%21 = mul nsw i32 2, %20
%22 = sdiv i32 %21, 100
%23 = mul nsw i32 %19, %22
%24 = sub nsw i32 %16, %23
store i32 %24, i32* %5
%25 = load i32, i32* %6
%26 = load i32, i32* %5
%27 = add nsw i32 %25, %26
store i32 %27, i32* %6
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
br label %11
30: ; preds = %11
%31 = load i32, i32* %6
%32 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %31)
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 %46
12: ; preds = %0
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sdiv i32 %13, -50
%16 = and i32 %10, 1
%17 = icmp eq i32 %10, 1
br i1 %17, label %36, label %18
18: ; preds = %12
%19 = and i32 %10, -2
br label %20
20: ; preds = %20, %18
%21 = phi i32 [ 0, %18 ], [ %33, %20 ]
%22 = phi i32 [ 0, %18 ], [ %32, %20 ]
%23 = phi i32 [ 0, %18 ], [ %34, %20 ]
%24 = sdiv i32 %21, %14
%25 = mul i32 %24, %15
%26 = add i32 %13, %22
%27 = add i32 %26, %25
%28 = or i32 %21, 1
%29 = sdiv i32 %28, %14
%30 = mul i32 %29, %15
%31 = add i32 %13, %27
%32 = add i32 %31, %30
%33 = add nuw nsw i32 %21, 2
%34 = add i32 %23, 2
%35 = icmp eq i32 %34, %19
br i1 %35, label %36, label %20
36: ; preds = %20, %12
%37 = phi i32 [ undef, %12 ], [ %32, %20 ]
%38 = phi i32 [ 0, %12 ], [ %33, %20 ]
%39 = phi i32 [ 0, %12 ], [ %32, %20 ]
%40 = icmp eq i32 %16, 0
br i1 %40, label %46, label %41
41: ; preds = %36
%42 = sdiv i32 %38, %14
%43 = mul i32 %42, %15
%44 = add i32 %13, %39
%45 = add i32 %44, %43
br label %46
46: ; preds = %41, %36, %0
%47 = phi i32 [ 0, %0 ], [ %37, %36 ], [ %45, %41 ]
%48 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %47)
ret i32 0
}