n = int(input()) assert 2 <= n <= 100 a = list(map(int, input().split())) assert n - 1 == len(a) x = 1000 y = 1 for i in a: assert 0 <= i <= 10 x *= 1000 - i y *= 1000 while x % 10 == 0 and y % 10 == 0: x //= 10 y //= 10 x = 1000 * y - x xx = str(x) m = len(str(x)) - len(str(y)) + 1 print(xx[:m] + "." + xx[m:])