#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;
  int discount = 0;
  int sum = 0;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  if (k >= n) {
    sum = n * m;
  } else {
    while (k <= n) {
      sum = sum + k * (m - (discount * m) / 100);
      n = n - k;
      discount = discount + 2;
    }
  }
  printf("%d", sum);
}


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    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeac(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9c(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1188 <main+0x68>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11e5 <main+0xc5>
jmp    118d <main+0x6d>
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11e0 <main+0xc0>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    $0x64,%esi
cltd
idiv   %esi
mov    -0x20(%rbp),%edx
mov    %eax,%esi
mov    -0x1c(%rbp),%eax
sub    %esi,%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    118d <main+0x6d>
jmp    11e5 <main+0xc5>
mov    -0x18(%rbp),%esi
lea    0xe11(%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    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%eax
mov    0xc(%rsp),%r9d
cmp    %eax,%edx
jge    119e <main+0x7e>
lea    (%r9,%r9,1),%r8d
xor    %ebx,%ebx
xor    %esi,%esi
nopl   0x0(%rax)
movslq %ebx,%rbx
imul   $0xffffffffae147ae1,%rbx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rdi
add    %ecx,%edi
add    %r9d,%edi
imul   %edx,%edi
add    %edi,%esi
sub    %edx,%eax
add    %r8d,%ebx
cmp    %edx,%eax
jge    1170 <main+0x50>
mov    %eax,0x4(%rsp)
jmp    11a5 <main+0x85>
imul   %eax,%r9d
mov    %r9d,%esi
lea    0xe54(%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
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %6
%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* %4)
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = icmp sge i32 %10, %11
br i1 %12, label %13, label %17
13: ; preds = %0
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = mul nsw i32 %14, %15
store i32 %16, i32* %6
br label %39
17: ; preds = %0
br label %18
18: ; preds = %22, %17
%19 = load i32, i32* %4
%20 = load i32, i32* %2
%21 = icmp sle i32 %19, %20
br i1 %21, label %22, label %38
22: ; preds = %18
%23 = load i32, i32* %6
%24 = load i32, i32* %4
%25 = load i32, i32* %3
%26 = load i32, i32* %5
%27 = load i32, i32* %3
%28 = mul nsw i32 %26, %27
%29 = sdiv i32 %28, 100
%30 = sub nsw i32 %25, %29
%31 = mul nsw i32 %24, %30
%32 = add nsw i32 %23, %31
store i32 %32, i32* %6
%33 = load i32, i32* %2
%34 = load i32, i32* %4
%35 = sub nsw i32 %33, %34
store i32 %35, i32* %2
%36 = load i32, i32* %5
%37 = add nsw i32 %36, 2
store i32 %37, i32* %5
br label %18
38: ; preds = %18
br label %39
39: ; preds = %38, %13
%40 = load i32, i32* %6
%41 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %1
ret i32 %42
}

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