#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 main() {
  int n, k, i;
  float l, m, v;
  l = 0;
  v = 1;
  scanf("%d", &n);
  scanf("%f", &m);
  scanf("%d", &k);
  for (i = 0; i < n / k; i++, v -= 0.02) {
    l += m * k * v;
  }
  printf("%d", (int)l);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xec1(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
lea    0xec5(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb6(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea1(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
jge    11ec <main+0xcc>
movss  -0x18(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0x1c(%rbp),%xmm2
movss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe2e(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1181 <main+0x61>
cvttss2si -0x14(%rbp),%esi
lea    0xe18(%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    0xee2(%rip),%r14
xor    %ebx,%ebx
lea    0x14(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xecd(%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),%eax
mov    0x10(%rsp),%ecx
cltd
idiv   %ecx
test   %eax,%eax
jle    1240 <main+0x120>
cvtsi2ss %ecx,%xmm0
mulss  0xc(%rsp),%xmm0
lea    -0x1(%rax),%edx
mov    %eax,%ecx
and    $0x3,%ecx
cmp    $0x3,%edx
jae    1198 <main+0x78>
xorps  %xmm1,%xmm1
movss  0xe6a(%rip),%xmm2
jmp    1211 <main+0xf1>
and    $0xfffffffc,%eax
xorps  %xmm1,%xmm1
movss  0xe5a(%rip),%xmm2
movsd  0xe5a(%rip),%xmm3
xchg   %ax,%ax
movaps %xmm0,%xmm4
mulss  %xmm2,%xmm4
cvtss2sd %xmm2,%xmm2
addsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
addss  %xmm1,%xmm4
movaps %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm4,%xmm1
cvtss2sd %xmm2,%xmm2
addsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
movaps %xmm0,%xmm4
mulss  %xmm2,%xmm4
cvtss2sd %xmm2,%xmm2
addsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
addss  %xmm1,%xmm4
movaps %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm4,%xmm1
cvtss2sd %xmm2,%xmm2
addsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
add    $0xfffffffc,%eax
jne    11b0 <main+0x90>
test   %ecx,%ecx
je     123c <main+0x11c>
movsd  0xdeb(%rip),%xmm3
nopl   (%rax)
movaps %xmm0,%xmm4
mulss  %xmm2,%xmm4
addss  %xmm4,%xmm1
cvtss2sd %xmm2,%xmm2
addsd  %xmm3,%xmm2
cvtsd2ss %xmm2,%xmm2
add    $0xffffffff,%ecx
jne    1220 <main+0x100>
cvttss2si %xmm1,%ebx
lea    0xdc9(%rip),%rdi
mov    %ebx,%esi
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"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
store float 0.000000e+00, float* %5
store float 1.000000e+00, float* %7
%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* %6)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 0, i32* %4
br label %11
11: ; preds = %25, %0
%12 = load i32, i32* %4
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = sdiv i32 %13, %14
%16 = icmp slt i32 %12, %15
br i1 %16, label %17, label %32
17: ; preds = %11
%18 = load float, float* %6
%19 = load i32, i32* %3
%20 = sitofp i32 %19 to float
%21 = fmul float %18, %20
%22 = load float, float* %7
%23 = load float, float* %5
%24 = call float @llvm.fmuladd.f32(float %21, float %22, float %23)
store float %24, float* %5
br label %25
25: ; preds = %17
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
%28 = load float, float* %7
%29 = fpext float %28 to double
%30 = fsub double %29, 2.000000e-02
%31 = fptrunc double %30 to float
store float %31, float* %7
br label %11
32: ; preds = %11
%33 = load float, float* %5
%34 = fptosi float %33 to i32
%35 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 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 = load i32, i32* %2
%12 = sdiv i32 %10, %11
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %63
14: ; preds = %0
%15 = load float, float* %3
%16 = sitofp i32 %11 to float
%17 = fmul float %15, %16
%18 = add i32 %12, -1
%19 = and i32 %12, 3
%20 = icmp ult i32 %18, 3
br i1 %20, label %45, label %21
21: ; preds = %14
%22 = and i32 %12, -4
br label %23
23: ; preds = %23, %21
%24 = phi float [ 1.000000e+00, %21 ], [ %42, %23 ]
%25 = phi float [ 0.000000e+00, %21 ], [ %39, %23 ]
%26 = phi i32 [ 0, %21 ], [ %43, %23 ]
%27 = call float @llvm.fmuladd.f32(float %17, float %24, float %25)
%28 = fpext float %24 to double
%29 = fadd double %28, -2.000000e-02
%30 = fptrunc double %29 to float
%31 = call float @llvm.fmuladd.f32(float %17, float %30, float %27)
%32 = fpext float %30 to double
%33 = fadd double %32, -2.000000e-02
%34 = fptrunc double %33 to float
%35 = call float @llvm.fmuladd.f32(float %17, float %34, float %31)
%36 = fpext float %34 to double
%37 = fadd double %36, -2.000000e-02
%38 = fptrunc double %37 to float
%39 = call float @llvm.fmuladd.f32(float %17, float %38, float %35)
%40 = fpext float %38 to double
%41 = fadd double %40, -2.000000e-02
%42 = fptrunc double %41 to float
%43 = add i32 %26, 4
%44 = icmp eq i32 %43, %22
br i1 %44, label %45, label %23
45: ; preds = %23, %14
%46 = phi float [ undef, %14 ], [ %39, %23 ]
%47 = phi float [ 1.000000e+00, %14 ], [ %42, %23 ]
%48 = phi float [ 0.000000e+00, %14 ], [ %39, %23 ]
%49 = icmp eq i32 %19, 0
br i1 %49, label %60, label %50
50: ; preds = %45, %50
%51 = phi float [ %57, %50 ], [ %47, %45 ]
%52 = phi float [ %54, %50 ], [ %48, %45 ]
%53 = phi i32 [ %58, %50 ], [ 0, %45 ]
%54 = call float @llvm.fmuladd.f32(float %17, float %51, float %52)
%55 = fpext float %51 to double
%56 = fadd double %55, -2.000000e-02
%57 = fptrunc double %56 to float
%58 = add i32 %53, 1
%59 = icmp eq i32 %58, %19
br i1 %59, label %60, label %50
60: ; preds = %50, %45
%61 = phi float [ %46, %45 ], [ %54, %50 ]
%62 = fptosi float %61 to i32
br label %63
63: ; preds = %60, %0
%64 = phi i32 [ 0, %0 ], [ %62, %60 ]
%65 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %64)
ret i32 0
}