n=int(input())

A=list(map(int,input().split()))

anow=0
anxt=0

m=1000
s=0

for i in range(n-1):
    if A[i+1]>A[i]:
        s=m//A[i]
        m-=A[i]*(m//A[i])
    elif A[i+1]<A[i]:
        m+=A[i]*s
        s=0

m+=A[n-1]*s
print(m)