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