#include <bits/stdc++.h>
int main() {
  int a;
  int n[200000];
  int *n_pointer = n;
  char buf[10];
  char buf2[300000];
  fgets(buf, 20000, stdin);
  fgets(buf2, 200000, stdin);
  sscanf(buf, "%d", &a);
  char *tp;
  tp = strtok(buf2, " ");
  int temporaryint = *tp - '0';
  n[0] = temporaryint;
  int i = 1;
  while (tp = strtok(NULL, " ")) {
    int temporaryint = *tp - '0';
    n[i] = temporaryint;
    i++;
  }
  int n_length = 0;
  for (int i = 0; n[i] != 0; i++) {
    n_length++;
  }
  float sum = 0;
  for (int i = 0; i < n_length; i++) {
    sum = sum + 1 / (float)n[i];
  }
  printf("%f", 1 / sum);
}
