#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 argc, const char *argv[]) {
  int i, m;
  double sum = 1;
  scanf("%d", &m);
  for (i = 2; i <= m; i++) {
    sum -= 1.0 / (i * i);
  }
  printf("%.6lf\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xebe(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1199 <main+0x79>
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xe87(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115a <main+0x3a>
movsd  -0x20(%rbp),%xmm0
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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),%ecx
cmp    $0x2,%ecx
jge    1148 <main+0x28>
movsd  0xebd(%rip),%xmm0
jmp    11e1 <main+0xc1>
lea    -0x1(%rcx),%r8d
cmp    $0x2,%ecx
jne    1160 <main+0x40>
mov    $0x2,%esi
movsd  0xea2(%rip),%xmm0
jmp    11c1 <main+0xa1>
mov    %r8d,%ecx
and    $0xfffffffe,%ecx
neg    %ecx
mov    $0x2,%edx
movsd  0xe8b(%rip),%xmm1
movapd %xmm1,%xmm0
nopl   0x0(%rax)
lea    0x1(%rdx),%edi
mov    %edx,%esi
lea    (%rcx,%rdx,1),%eax
add    $0x2,%eax
imul   %edx,%edx
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
movapd %xmm1,%xmm3
divsd  %xmm2,%xmm3
subsd  %xmm3,%xmm0
imul   %edi,%edi
xorps  %xmm2,%xmm2
cvtsi2sd %edi,%xmm2
movapd %xmm1,%xmm3
divsd  %xmm2,%xmm3
subsd  %xmm3,%xmm0
add    $0x2,%esi
mov    %esi,%edx
cmp    $0x2,%eax
jne    1180 <main+0x60>
test   $0x1,%r8b
je     11e1 <main+0xc1>
imul   %esi,%esi
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
movsd  0xe2f(%rip),%xmm2
divsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
lea    0xe2b(%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"%.6lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 1.000000e+00, double* %8
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
store i32 2, i32* %6
br label %10
10: ; preds = %22, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %25
14: ; preds = %10
%15 = load i32, i32* %6
%16 = load i32, i32* %6
%17 = mul nsw i32 %15, %16
%18 = sitofp i32 %17 to double
%19 = fdiv double 1.000000e+00, %18
%20 = load double, double* %8
%21 = fsub double %20, %19
store double %21, double* %8
br label %22
22: ; preds = %14
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %10
25: ; preds = %10
%26 = load double, double* %8
%27 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"%.6lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 2
br i1 %7, label %40, label %8
8: ; preds = %2
%9 = add i32 %6, -1
%10 = and i32 %9, 1
%11 = icmp eq i32 %6, 2
br i1 %11, label %30, label %12
12: ; preds = %8
%13 = and i32 %9, -2
br label %14
14: ; preds = %14, %12
%15 = phi double [ 1.000000e+00, %12 ], [ %26, %14 ]
%16 = phi i32 [ 2, %12 ], [ %27, %14 ]
%17 = phi i32 [ 0, %12 ], [ %28, %14 ]
%18 = mul nsw i32 %16, %16
%19 = sitofp i32 %18 to double
%20 = fdiv double 1.000000e+00, %19
%21 = fsub double %15, %20
%22 = or i32 %16, 1
%23 = mul nsw i32 %22, %22
%24 = sitofp i32 %23 to double
%25 = fdiv double 1.000000e+00, %24
%26 = fsub double %21, %25
%27 = add nuw i32 %16, 2
%28 = add i32 %17, 2
%29 = icmp eq i32 %28, %13
br i1 %29, label %30, label %14
30: ; preds = %14, %8
%31 = phi double [ undef, %8 ], [ %26, %14 ]
%32 = phi double [ 1.000000e+00, %8 ], [ %26, %14 ]
%33 = phi i32 [ 2, %8 ], [ %27, %14 ]
%34 = icmp eq i32 %10, 0
br i1 %34, label %40, label %35
35: ; preds = %30
%36 = mul nsw i32 %33, %33
%37 = sitofp i32 %36 to double
%38 = fdiv double 1.000000e+00, %37
%39 = fsub double %32, %38
br label %40
40: ; preds = %35, %30, %2
%41 = phi double [ 1.000000e+00, %2 ], [ %31, %30 ], [ %39, %35 ]
%42 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %41)
ret i32 0
}