# cook your dish here
n = int(input())
l = list(map(int, input().split()))
small = l[0]
ans = 1000
for i in range(1, n):
    if l[i]<small:
        small = l[i]
    elif l[i]>small:
        ans = ans + (ans//small)*(l[i]-small)
        if i<n-1:
            small = l[i+1]
            i=i+1
print(ans)