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