#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  vector<int> A(2 * n);
  for (int i = 0; i < 2 * n; i += 2) cin >> A[i];
  for (int i = 1; i < 2 * n; i += 2) cin >> A[i];
  double mass = m;
  for (int i = 0; i < 2 * n; i++) {
    if (A[i] == 1) {
      cout << -1 << "\n";
      return 0;
    }
    mass += mass / (A[i] - 1);
  }
  cout << fixed << setprecision(20) << mass - m << "\n";
  return 0;
}
