#include <bits/stdc++.h>
using namespace std;
long long fact(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return fact(b, a % b);
}
int main() {
  long long int n, i, k, j, w = 0, z = 0, x, y, r = 0, r1 = 0, r2 = 0, r3 = 0;
  double d, f;
  cin >> n >> d;
  f = d;
  for (i = 0; i < 2 * n; i++) {
    double g;
    cin >> g;
    if (g == 1) {
      cout << "-1";
      return 0;
    } else
      d = ((d * g) / (g - 1));
  }
  cout << setprecision(10) << fixed << (d - f);
  return 0;
}
