N = int(input()) A = list(map(int, input().split())) x = 1 for a in A: x *= (1000 - a) / 1000 x *= 1000 ans = 1000 - x print(ans)