#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 k, n, m, sum = 0, disc = 0;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  for (int i = 0; i < n; i++) {
    if (i % k == 0 && i != 0) {
      disc += 2;
    }
    sum += m - (m * disc / 100);
  }
  printf("%d", 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)
lea    0xebc(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9c(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11d3 <main+0xb3>
mov    -0x1c(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    11a3 <main+0x83>
cmpl   $0x0,-0x1c(%rbp)
je     11a3 <main+0x83>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1174 <main+0x54>
mov    -0x14(%rbp),%esi
lea    0xe23(%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    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%r9d
test   %r9d,%r9d
jle    11ac <main+0x8c>
mov    0xc(%rsp),%r8d
xor    %ecx,%ecx
mov    0x4(%rsp),%ebx
xor    %edi,%edi
xor    %esi,%esi
nopl   0x0(%rax)
mov    %ecx,%eax
cltd
idiv   %r8d
lea    0x2(%rdi),%eax
test   %edx,%edx
cmovne %edi,%eax
test   %ecx,%ecx
cmove  %edi,%eax
mov    %eax,%edi
imul   %ebx,%eax
cltq
imul   $0xffffffffae147ae1,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
add    %ebx,%esi
add    %eax,%esi
add    $0x1,%ecx
cmp    %ecx,%r9d
jne    1170 <main+0x50>
jmp    11ae <main+0x8e>
xor    %esi,%esi
lea    0xe4b(%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
%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* %4)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32 0, i32* %7
br label %11
11: ; preds = %35, %0
%12 = load i32, i32* %7
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %38
15: ; preds = %11
%16 = load i32, i32* %7
%17 = load i32, i32* %2
%18 = srem i32 %16, %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %26
20: ; preds = %15
%21 = load i32, i32* %7
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 2
store i32 %25, i32* %6
br label %26
26: ; preds = %23, %20, %15
%27 = load i32, i32* %4
%28 = load i32, i32* %4
%29 = load i32, i32* %6
%30 = mul nsw i32 %28, %29
%31 = sdiv i32 %30, 100
%32 = sub nsw i32 %27, %31
%33 = load i32, i32* %5
%34 = add nsw i32 %33, %32
store i32 %34, i32* %5
br label %35
35: ; preds = %26
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
br label %11
38: ; preds = %11
%39 = load i32, i32* %5
%40 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %39)
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* %2)
%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* %1)
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = load i32, i32* %1
%14 = load i32, i32* %3
br label %18
15: ; preds = %18, %0
%16 = phi i32 [ 0, %0 ], [ %31, %18 ]
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
18: ; preds = %12, %18
%19 = phi i32 [ 0, %12 ], [ %32, %18 ]
%20 = phi i32 [ 0, %12 ], [ %27, %18 ]
%21 = phi i32 [ 0, %12 ], [ %31, %18 ]
%22 = srem i32 %19, %13
%23 = icmp eq i32 %22, 0
%24 = icmp ne i32 %19, 0
%25 = and i1 %24, %23
%26 = add nsw i32 %20, 2
%27 = select i1 %25, i32 %26, i32 %20
%28 = mul nsw i32 %27, %14
%29 = sdiv i32 %28, -100
%30 = add i32 %14, %21
%31 = add i32 %30, %29
%32 = add nuw nsw i32 %19, 1
%33 = icmp eq i32 %32, %10
br i1 %33, label %15, label %18
}