import sys input = sys.stdin.readline n = int(input()) a = list(map(int, input().split())) p = 1 m = 1000 for i in a: p *= (m - i) / m ans = m - m * p print(ans)