#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 *, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n, i;
  float soma = 0;
  float m;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%f", &m);
    soma = soma + (1 / (m + 1));
  }
  soma = n / soma;
  printf("%.2f", soma - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11a3 <main+0x83>
lea    0xea4(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
movss  0xe85(%rip),%xmm2
addss  -0x14(%rbp),%xmm2
movss  0xe78(%rip),%xmm1
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1150 <main+0x30>
cvtsi2ssl -0x8(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xe41(%rip),%xmm1
subss  %xmm1,%xmm0
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
xorps  %xmm1,%xmm1
test   %eax,%eax
jle    11aa <main+0x8a>
lea    0xebe(%rip),%r14
lea    0xc(%rsp),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  %xmm1,0x4(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0xe7f(%rip),%xmm1
addss  %xmm1,%xmm0
divss  %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x4(%rsp)
movss  0x4(%rsp),%xmm1
mov    0x8(%rsp),%eax
add    $0x1,%ebp
cmp    %eax,%ebp
jl     1160 <main+0x40>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  %xmm1,%xmm0
addss  0xe47(%rip),%xmm0
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = bitcast i32* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %19, label %8
8: ; preds = %0, %8
%9 = phi float [ %15, %8 ], [ 0.000000e+00, %0 ]
%10 = phi i32 [ %16, %8 ], [ 1, %0 ]
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%12 = load float, float* %2
%13 = fadd float %12, 1.000000e+00
%14 = fdiv float 1.000000e+00, %13
%15 = fadd float %9, %14
%16 = add nuw nsw i32 %10, 1
%17 = load i32, i32* %1
%18 = icmp slt i32 %10, %17
br i1 %18, label %8, label %19
19: ; preds = %8, %0
%20 = phi float [ 0.000000e+00, %0 ], [ %15, %8 ]
%21 = phi i32 [ %6, %0 ], [ %17, %8 ]
%22 = sitofp i32 %21 to float
%23 = fdiv float %22, %20
%24 = fadd float %23, -1.000000e+00
%25 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), float %24)
ret i32 0
}