n = int(input())
a = list(map(int, input().split()))
run = 1000
for v in a: run *= 1-v/1000
print(1000-run)