#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;
  scanf("%d", &n);
  double p[1001];
  p[1] = 1.0;
  int i;
  for (i = 2; i <= n; i++) {
    p[i] = (2 * (i - 1) + 0.0) / (2 * i - 1) * p[i - 1];
  }
  printf("%.6f\n", p[n]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0x1f48(%rbp)
ff
movl   $0x2,-0x1f54(%rbp)
mov    -0x1f54(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ce <main+0xae>
mov    -0x1f54(%rbp),%eax
sub    $0x1,%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
mov    -0x1f54(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    -0x1f54(%rbp),%eax
sub    $0x1,%eax
cltq
mulsd  -0x1f50(%rbp,%rax,8),%xmm0
ff ff
movslq -0x1f54(%rbp),%rax
movsd  %xmm0,-0x1f50(%rbp,%rax,8)
ff ff
mov    -0x1f54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f54(%rbp)
jmp    115c <main+0x3c>
movslq -0x8(%rbp),%rax
movsd  -0x1f50(%rbp,%rax,8),%xmm0
ff ff
lea    0xe29(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1f60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1f58,%rsp
lea    0xef2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movabs $0x3ff0000000000000,%rax
mov    %rax,0x18(%rsp)
mov    0xc(%rsp),%eax
cmp    $0x2,%eax
jl     11a5 <main+0x85>
lea    0x1(%rax),%rcx
mov    $0x2,%edx
movsd  0xe9f(%rip),%xmm0
movdqa 0xea7(%rip),%xmm1
nopl   0x0(%rax)
movq   %rdx,%xmm2
paddd  %xmm2,%xmm2
pshufd $0x50,%xmm2,%xmm2
paddd  %xmm1,%xmm2
cvtdq2pd %xmm2,%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
divsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1170 <main+0x50>
cltq
movsd  0x10(%rsp,%rax,8),%xmm0
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1f58,%rsp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%.6f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1001 x double]
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = bitcast [1001 x double]* %2 to i8*
%6 = getelementptr inbounds [1001 x double], [1001 x double]* %2, i64 0, i64 1
store double 1.000000e+00, double* %6
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 2
br i1 %8, label %28, label %9
9: ; preds = %0
%10 = add nuw i32 %7, 1
%11 = zext i32 %10 to i64
br label %12
12: ; preds = %9, %12
%13 = phi double [ 1.000000e+00, %9 ], [ %24, %12 ]
%14 = phi i64 [ 2, %9 ], [ %26, %12 ]
%15 = trunc i64 %14 to i32
%16 = insertelement <2 x i32> undef, i32 %15, i64 0
%17 = shl <2 x i32> %16, <i32 1, i32 0>
%18 = shufflevector <2 x i32> %17, <2 x i32> poison, <2 x i32> zeroinitializer
%19 = add <2 x i32> %18, <i32 -2, i32 -1>
%20 = sitofp <2 x i32> %19 to <2 x double>
%21 = extractelement <2 x double> %20, i64 0
%22 = extractelement <2 x double> %20, i64 1
%23 = fdiv double %21, %22
%24 = fmul double %23, %13
%25 = getelementptr inbounds [1001 x double], [1001 x double]* %2, i64 0, i64 %14
store double %24, double* %25
%26 = add nuw nsw i64 %14, 1
%27 = icmp eq i64 %26, %11
br i1 %27, label %28, label %12
28: ; preds = %12, %0
%29 = sext i32 %7 to i64
%30 = getelementptr inbounds [1001 x double], [1001 x double]* %2, i64 0, i64 %29
%31 = load double, double* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %31)
ret i32 0
}