#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; vector A(n-1); rep(i,n-1) cin>>A[i]; double ans=1; rep(i,n-1) ans*=(1-A[i]/1000); ans=1-ans; ans*=1000; printf("%.10f\n",ans); return 0; }