import sys input = sys.stdin.readline n = int(input()) a = list(map(int, input().split())) m = d = 1000 ans = 0 for x in a: ans += x * (d / m) d = m - ans print(ans)