#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 *, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n, k, disc;
  float m, sum;
  scanf("%d", &n);
  scanf("%f", &m);
  scanf("%d", &k);
  sum = 0.0;
  for (int i = 0; i < n; i++) {
    disc = i / k;
    sum += m - ((m * (disc * 2)) / 100);
  }
  printf("%.f", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ca <main+0xaa>
mov    -0x1c(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm1
movss  0xe56(%rip),%xmm2
divss  %xmm2,%xmm1
subss  %xmm1,%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1174 <main+0x54>
movss  -0x18(%rbp),%xmm0
lea    0xe34(%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    0xed6(%rip),%r14
xor    %ebx,%ebx
lea    0x14(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x14(%rsp),%ecx
test   %ecx,%ecx
jle    11a7 <main+0x87>
mov    0x10(%rsp),%esi
xorps  %xmm0,%xmm0
movss  0xc(%rsp),%xmm1
movss  0xe82(%rip),%xmm2
xchg   %ax,%ax
mov    %ebx,%eax
cltd
idiv   %esi
add    %eax,%eax
xorps  %xmm3,%xmm3
cvtsi2ss %eax,%xmm3
mulss  %xmm1,%xmm3
divss  %xmm2,%xmm3
addss  %xmm1,%xmm3
addss  %xmm3,%xmm0
add    $0x1,%ebx
cmp    %ebx,%ecx
jne    1180 <main+0x60>
jmp    11aa <main+0x8a>
xorps  %xmm0,%xmm0
lea    0xe59(%rip),%rdi
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"
@.str.2 = [4 x i8] c"%.f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca i32
store i32 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* %5)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store float 0.000000e+00, float* %6
store i32 0, i32* %7
br label %11
11: ; preds = %29, %0
%12 = load i32, i32* %7
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %32
15: ; preds = %11
%16 = load i32, i32* %7
%17 = load i32, i32* %3
%18 = sdiv i32 %16, %17
store i32 %18, i32* %4
%19 = load float, float* %5
%20 = load float, float* %5
%21 = load i32, i32* %4
%22 = mul nsw i32 %21, 2
%23 = sitofp i32 %22 to float
%24 = fmul float %20, %23
%25 = fdiv float %24, 1.000000e+02
%26 = fsub float %19, %25
%27 = load float, float* %6
%28 = fadd float %27, %26
store float %28, float* %6
br label %29
29: ; preds = %15
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %11
32: ; preds = %11
%33 = load float, float* %6
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [4 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.1, i64 0, i64 0), float* %3)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = load i32, i32* %2
%14 = load float, float* %3
br label %18
15: ; preds = %18, %0
%16 = phi float [ 0.000000e+00, %0 ], [ %27, %18 ]
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float %16)
ret i32 0
18: ; preds = %12, %18
%19 = phi i32 [ 0, %12 ], [ %28, %18 ]
%20 = phi float [ 0.000000e+00, %12 ], [ %27, %18 ]
%21 = sdiv i32 %19, %13
%22 = shl nsw i32 %21, 1
%23 = sitofp i32 %22 to float
%24 = fmul float %14, %23
%25 = fdiv float %24, 1.000000e+02
%26 = fsub float %14, %25
%27 = fadd float %20, %26
%28 = add nuw nsw i32 %19, 1
%29 = icmp eq i32 %28, %10
br i1 %29, label %15, label %18
}