n = int(input()) m = input() m = m.split(' ') q = 1 for num in m: p = 1000 - int(num) p = p / 1000 q *= p q = 1000 * q q = 1000 - q print(q)