#include #define rep(i, l, n) for (int i = (l); i < (n); i++) using namespace std; int main(void) { int n; cin >> n; double m = 1000.0, d = 1000.0; double ans = 0; rep(i, 0, n - 1) { int a; cin >> a; ans += a * (d / m); d = 1000.0 - ans; } printf("%.9f\n", ans); return 0; }