N=int(input())
A = list(map(int,input().split()))
M=1000
S=0

for i in range(N-1):
    #day i behaviour
    if A[i]<A[i+1]:
        # buy as many as possible
        S=M//A[i]
        M-=S*A[i]
    elif A[i]>A[i+1]:
        #sell all
        M+=S*A[i]
        S=0
print(M+S*A[-1])  # last day sell all stocks