import java.util.*;
import java.math.BigDecimal;

public class Main {
  public static void main(String[] args) {
    int N;
    int[] A;
    try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    }
    double answer = solve(A);
    System.out.println(answer);
  }
  
  private static double solve(int[] a) {
    int n = a.length;
    if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    }
    if ( n == 1 ) {
      return (double)a[0];
    }
    int n0 = (int)Math.ceil(n/2);
    int n1 = n - n0;
    double r = 0.0d;
    if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    }
    if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    }
    return 1/r;
  }

} import java.util.*; util.* java import java.math.BigDecimal; BigDecimal java.math public class Main {
  public static void main(String[] args) {
    int N;
    int[] A;
    try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    }
    double answer = solve(A);
    System.out.println(answer);
  }
  
  private static double solve(int[] a) {
    int n = a.length;
    if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    }
    if ( n == 1 ) {
      return (double)a[0];
    }
    int n0 = (int)Math.ceil(n/2);
    int n1 = n - n0;
    double r = 0.0d;
    if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    }
    if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    }
    return 1/r;
  }

} Main public static void main(String[] args) {
    int N;
    int[] A;
    try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    }
    double answer = solve(A);
    System.out.println(answer);
  } main {
    int N;
    int[] A;
    try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    }
    double answer = solve(A);
    System.out.println(answer);
  } int N; N int[] A; A try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    } {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc A = new int[N] A new int[N] N for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
        A[i] = sc.nextInt();
      } {
        A[i] = sc.nextInt();
      } A[i] = sc.nextInt() A[i] A i sc.nextInt() sc.nextInt sc double answer = solve(A); answer solve(A) solve A System.out.println(answer) System.out.println System.out System System.out answer String[] args args private static double solve(int[] a) {
    int n = a.length;
    if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    }
    if ( n == 1 ) {
      return (double)a[0];
    }
    int n0 = (int)Math.ceil(n/2);
    int n1 = n - n0;
    double r = 0.0d;
    if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    }
    if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    }
    return 1/r;
  } solve {
    int n = a.length;
    if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    }
    if ( n == 1 ) {
      return (double)a[0];
    }
    int n0 = (int)Math.ceil(n/2);
    int n1 = n - n0;
    double r = 0.0d;
    if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    }
    if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    }
    return 1/r;
  } int n = a.length; n a.length a a.length if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    } n == 0 n 0 {
      throw new IllegalStateException("n must be positive");
    } throw new IllegalStateException("n must be positive"); new IllegalStateException("n must be positive") if ( n == 1 ) {
      return (double)a[0];
    } n == 1 n 1 {
      return (double)a[0];
    } return (double)a[0]; (double)a[0] a 0 int n0 = (int)Math.ceil(n/2); n0 (int)Math.ceil(n/2) Math.ceil Math n/2 n 2 int n1 = n - n0; n1 n - n0 n n0 double r = 0.0d; r 0.0d if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    } n0 > 0 n0 0 {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    } int[] a0 = new int[n0]; a0 new int[n0] n0 System.arraycopy(a, 0, a0, 0, n0) System.arraycopy System a 0 a0 0 n0 double s0 = solve(a0); s0 solve(a0) solve a0 r += 1/s0 r 1/s0 1 s0 if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    } n1 > 0 n1 0 {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    } int[] a1 = new int[n1]; a1 new int[n1] n1 System.arraycopy(a, n0, a1, 0, n1) System.arraycopy System a n0 a1 0 n1 double s1 = solve(a1); s1 solve(a1) solve a1 r += 1/s1 r 1/s1 1 s1 return 1/r; 1/r 1 r int[] a a public class Main {
  public static void main(String[] args) {
    int N;
    int[] A;
    try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    }
    double answer = solve(A);
    System.out.println(answer);
  }
  
  private static double solve(int[] a) {
    int n = a.length;
    if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    }
    if ( n == 1 ) {
      return (double)a[0];
    }
    int n0 = (int)Math.ceil(n/2);
    int n1 = n - n0;
    double r = 0.0d;
    if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    }
    if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    }
    return 1/r;
  }

} public class Main {
  public static void main(String[] args) {
    int N;
    int[] A;
    try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    }
    double answer = solve(A);
    System.out.println(answer);
  }
  
  private static double solve(int[] a) {
    int n = a.length;
    if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    }
    if ( n == 1 ) {
      return (double)a[0];
    }
    int n0 = (int)Math.ceil(n/2);
    int n1 = n - n0;
    double r = 0.0d;
    if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    }
    if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    }
    return 1/r;
  }

} Main
import java.util.*;
import java.math.BigDecimal;

public class Main {
  public static void main(String[] args) {
    int N;
    int[] A;
    try(Scanner sc = new Scanner(System.in)) {
      N = sc.nextInt();
      A = new int[N];
      for(int i = 0; i < N; i++) {
        A[i] = sc.nextInt();
      }
    }
    double answer = solve(A);
    System.out.println(answer);
  }
  
  private static double solve(int[] a) {
    int n = a.length;
    if ( n == 0 ) {
      throw new IllegalStateException("n must be positive");
    }
    if ( n == 1 ) {
      return (double)a[0];
    }
    int n0 = (int)Math.ceil(n/2);
    int n1 = n - n0;
    double r = 0.0d;
    if ( n0 > 0 ) {
      int[] a0 = new int[n0];
      System.arraycopy(a, 0, a0, 0, n0);
      double s0 = solve(a0);
      r += 1/s0;
    }
    if ( n1 > 0 ) {
	  int[] a1 = new int[n1];
      System.arraycopy(a, n0, a1, 0, n1);
      double s1 = solve(a1);
      r += 1/s1;
    }
    return 1/r;
  }

}