# TLE(?) import sys from decimal import Decimal as dec input = sys.stdin.readline n = int(input()) a = list(map(dec, input().split())) m = dec(1000) p = q = dec(1) for i in a: p *= m - i q *= m ans = m - m * p / q print(ans)