mod = 998244353 def main(): import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) r = 1 for a in A: r *= (1000 - a) / 1000 print(1000 - 1000 * r) if __name__ == '__main__': main()