#include <bits/stdc++.h>
using namespace std;
long long GCD(long long a, long long b) {
  if (b > a) swap(a, b);
  if (a % b == 0) return b;
  return GCD(b, a % b);
}
long long LCM(long long a, long long b) { return a * b / GCD(a, b); }
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N, lcm = 1;
  cin >> N;
  vector<long long> vec(N);
  for (int i = 0; i < N; ++i) cin >> vec[i];
  long long bunshi = 1;
  long long bunbo = vec[0];
  for (long long i = 1; i < N; ++i) {
    bunshi = vec[i] * bunshi + bunbo;
    bunbo *= vec[i];
    long long tmp = GCD(bunshi, bunbo);
    if (tmp > 1) {
      bunshi /= tmp;
      bunbo /= tmp;
    }
  }
  cout << fixed << setprecision(15);
  cout << double(bunbo) / bunshi << "\n";
}
