#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 *, double *);
int main() {
  double n, ans = 0.0;
  scanf("%lf", &n);
  while (n--) {
    ans += 6.0;
    ans = 1.0 / ans;
  }
  ans += 3.0;
  printf("%.10lf\n", ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xeac(%rip),%xmm2
movaps %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1178 <main+0x58>
jp     1178 <main+0x58>
jmp    11a1 <main+0x81>
movsd  0xe98(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe7e(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1147 <main+0x27>
movsd  0xe5f(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
movsd  0xec3(%rip),%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    114d <main+0x2d>
jnp    1196 <main+0x76>
movsd  0xebb(%rip),%xmm3
movsd  0xebb(%rip),%xmm4
movsd  0xe9b(%rip),%xmm5
xorpd  %xmm0,%xmm0
nopl   0x0(%rax)
movapd %xmm0,%xmm6
addsd  %xmm3,%xmm6
movapd %xmm4,%xmm0
divsd  %xmm6,%xmm0
ucomisd %xmm2,%xmm1
addsd  %xmm5,%xmm1
jne    1170 <main+0x50>
jp     1170 <main+0x50>
addsd  0xe74(%rip),%xmm0
jmp    119e <main+0x7e>
movsd  0xe6a(%rip),%xmm0
movsd  %xmm1,(%rsp)
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [8 x i8] c"%.10lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
br label %5
5: ; preds = %9, %0
%6 = load double, double* %2
%7 = fadd double %6, -1.000000e+00
store double %7, double* %2
%8 = fcmp une double %6, 0.000000e+00
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load double, double* %3
%11 = fadd double %10, 6.000000e+00
store double %11, double* %3
%12 = load double, double* %3
%13 = fdiv double 1.000000e+00, %12
store double %13, double* %3
br label %5
14: ; preds = %5
%15 = load double, double* %3
%16 = fadd double %15, 3.000000e+00
store double %16, double* %3
%17 = load double, double* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [8 x i8] c"%.10lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fadd double %4, -1.000000e+00
%6 = fcmp une double %4, 0.000000e+00
br i1 %6, label %7, label %16
7: ; preds = %0, %7
%8 = phi double [ %12, %7 ], [ %5, %0 ]
%9 = phi double [ %11, %7 ], [ 0.000000e+00, %0 ]
%10 = fadd double %9, 6.000000e+00
%11 = fdiv double 1.000000e+00, %10
%12 = fadd double %8, -1.000000e+00
%13 = fcmp une double %8, 0.000000e+00
br i1 %13, label %7, label %14
14: ; preds = %7
%15 = fadd double %11, 3.000000e+00
br label %16
16: ; preds = %14, %0
%17 = phi double [ %5, %0 ], [ %12, %14 ]
%18 = phi double [ 3.000000e+00, %0 ], [ %15, %14 ]
store double %17, double* %1
%19 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %18)
ret i32 0
}