#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 *, double);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int weight = 0;
  double money = 0;
  scanf("%d", &weight);
  if (weight <= 100) {
    money = weight / 20;
    if (weight % 20 != 0)
      ++money;
  } else {
    money = 5;
    weight -= 100;
    money += ((weight / 100) * 1.2);
    if (weight % 100 != 0)
      money += 1.2;
  }
  printf("%.2f\n", money);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0x8(%rbp)
jg     1197 <main+0x77>
mov    -0x8(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1192 <main+0x72>
movsd  0xe88(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1201 <main+0xe1>
movsd  0xe69(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x64,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe37(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11fc <main+0xdc>
movsd  0xe0e(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1201 <main+0xe1>
movsd  -0x10(%rbp),%xmm0
lea    0xe0e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x64,%eax
jg     117d <main+0x5d>
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
cvtsi2sd %ecx,%xmm0
imul   $0xcccccccd,%eax,%eax
add    $0x19999998,%eax
ror    $0x2,%eax
cmp    $0xccccccd,%eax
jb     11bb <main+0x9b>
addsd  0xe95(%rip),%xmm0
jmp    11bb <main+0x9b>
add    $0xffffff9c,%eax
mov    %eax,0x4(%rsp)
imul   $0x51eb851f,%rax,%rcx
shr    $0x25,%rcx
cvtsi2sd %ecx,%xmm0
movsd  0xe65(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xe61(%rip),%xmm0
imul   $0xc28f5c29,%eax,%eax
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
jb     11bb <main+0x9b>
addsd  %xmm1,%xmm0
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
store i32 0, i32* %2
store double 0.000000e+00, double* %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 100
br i1 %6, label %7, label %18
7: ; preds = %0
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 20
%10 = sitofp i32 %9 to double
store double %10, double* %3
%11 = load i32, i32* %2
%12 = srem i32 %11, 20
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %7
%15 = load double, double* %3
%16 = fadd double %15, 1.000000e+00
store double %16, double* %3
br label %17
17: ; preds = %14, %7
br label %33
18: ; preds = %0
store double 5.000000e+00, double* %3
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 100
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = sdiv i32 %21, 100
%23 = sitofp i32 %22 to double
%24 = load double, double* %3
%25 = call double @llvm.fmuladd.f64(double %23, double 1.200000e+00, double %24)
store double %25, double* %3
%26 = load i32, i32* %2
%27 = srem i32 %26, 100
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %18
%30 = load double, double* %3
%31 = fadd double %30, 1.200000e+00
store double %31, double* %3
br label %32
32: ; preds = %29, %18
br label %33
33: ; preds = %32, %17
%34 = load double, double* %3
%35 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 101
br i1 %5, label %6, label %13
6: ; preds = %0
%7 = sdiv i32 %4, 20
%8 = sitofp i32 %7 to double
%9 = srem i32 %4, 20
%10 = icmp eq i32 %9, 0
%11 = fadd double %8, 1.000000e+00
%12 = select i1 %10, double %8, double %11
br label %22
13: ; preds = %0
%14 = add nsw i32 %4, -100
store i32 %14, i32* %1
%15 = udiv i32 %14, 100
%16 = sitofp i32 %15 to double
%17 = call double @llvm.fmuladd.f64(double %16, double 1.200000e+00, double 5.000000e+00)
%18 = urem i32 %14, 100
%19 = icmp eq i32 %18, 0
%20 = fadd double %17, 1.200000e+00
%21 = select i1 %19, double %17, double %20
br label %22
22: ; preds = %13, %6
%23 = phi double [ %12, %6 ], [ %21, %13 ]
%24 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %23)
ret i32 0
}