#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 n;
  double ch3ch2oh = 0;
  scanf("%d", &n);
  do
    ch3ch2oh = (ch3ch2oh + 1) / 2;
  while (--n);
  printf("%.5lf\n", ch3ch2oh);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeb9(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xea4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jne    1147 <main+0x27>
movsd  -0x10(%rbp),%xmm0
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %eax,%edx
and    $0x7,%edx
je     1178 <main+0x58>
xor    %esi,%esi
xorpd  %xmm0,%xmm0
movsd  0xeb2(%rip),%xmm1
movsd  0xeb2(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
add    $0x1,%esi
cmp    %esi,%edx
jne    1160 <main+0x40>
sub    %esi,%eax
cmp    $0x7,%ecx
jae    1181 <main+0x61>
jmp    11e5 <main+0xc5>
xorpd  %xmm0,%xmm0
cmp    $0x7,%ecx
jb     11e5 <main+0xc5>
movsd  0xe77(%rip),%xmm1
movsd  0xe77(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
add    $0xfffffff8,%eax
jne    11a0 <main+0x80>
movl   $0x0,0x4(%rsp)
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%.5lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
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)
br label %5
5: ; preds = %9, %0
%6 = load double, double* %3
%7 = fadd double %6, 1.000000e+00
%8 = fdiv double %7, 2.000000e+00
store double %8, double* %3
br label %9
9: ; preds = %5
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
%12 = icmp ne i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %9
%14 = load double, double* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%.5lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%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 = add i32 %4, -1
%6 = and i32 %4, 7
%7 = icmp eq i32 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %0, %8
%9 = phi i32 [ %14, %8 ], [ %4, %0 ]
%10 = phi double [ %13, %8 ], [ 0.000000e+00, %0 ]
%11 = phi i32 [ %15, %8 ], [ 0, %0 ]
%12 = fadd double %10, 1.000000e+00
%13 = fmul double %12, 5.000000e-01
%14 = add nsw i32 %9, -1
%15 = add i32 %11, 1
%16 = icmp eq i32 %15, %6
br i1 %16, label %17, label %8
17: ; preds = %8, %0
%18 = phi double [ undef, %0 ], [ %13, %8 ]
%19 = phi i32 [ %4, %0 ], [ %14, %8 ]
%20 = phi double [ 0.000000e+00, %0 ], [ %13, %8 ]
%21 = icmp ult i32 %5, 7
br i1 %21, label %43, label %22
22: ; preds = %17, %22
%23 = phi i32 [ %41, %22 ], [ %19, %17 ]
%24 = phi double [ %40, %22 ], [ %20, %17 ]
%25 = fadd double %24, 1.000000e+00
%26 = fmul double %25, 5.000000e-01
%27 = fadd double %26, 1.000000e+00
%28 = fmul double %27, 5.000000e-01
%29 = fadd double %28, 1.000000e+00
%30 = fmul double %29, 5.000000e-01
%31 = fadd double %30, 1.000000e+00
%32 = fmul double %31, 5.000000e-01
%33 = fadd double %32, 1.000000e+00
%34 = fmul double %33, 5.000000e-01
%35 = fadd double %34, 1.000000e+00
%36 = fmul double %35, 5.000000e-01
%37 = fadd double %36, 1.000000e+00
%38 = fmul double %37, 5.000000e-01
%39 = fadd double %38, 1.000000e+00
%40 = fmul double %39, 5.000000e-01
%41 = add nsw i32 %23, -8
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %22
43: ; preds = %22, %17
%44 = phi double [ %18, %17 ], [ %40, %22 ]
store i32 0, i32* %1
%45 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %44)
ret i32 0
}