#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char c = getchar();
  int x = 0, f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  do {
    x = x * 10 + (c ^ 48);
    c = getchar();
  } while (isdigit(c));
  return x * f;
}
const int N = 2e4 + 29;
int n, qwq;
double a[N], b[N];
double ans, m;
int main() {
  n = read();
  cin >> m;
  qwq = m;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i * 2 - 1];
  }
  cin >> a[2 * n];
  for (int i = 1; i < n; ++i) {
    cin >> a[i * 2];
  }
  for (int i = 1; i <= 2 * n; ++i) {
    if (a[i] <= 1) {
      printf("-1\n");
      return 0;
    }
  }
  for (int i = 2 * n; i >= 1; --i) {
    double tmp = m / (a[i] - 1.0);
    m += tmp;
  }
  m -= qwq;
  printf("%.9f\n", m);
  return 0;
}
