#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n; cin >> n; vector a(n - 1); rep(i, n - 1) cin >> a[i]; double ans = 1; rep(i, n - 1) ans *= 1 - (double) a[i] / 1000; cout << fixed << setprecision(15) << 1000 * (1 - ans) << endl; return 0; }