N=int(input())
A = list(map(int, input().split()))
money=1000
stock=0
#1日目
if A[0]<A[1]:
    stock=int(money/A[0])
    money=money-stock*A[0]
    #print(1,money,stock)

for i in range(1,N-2):
    #買い戦略
    if A[i-1]>A[i] and A[i] <=A[i+1]:
        stock=int(money/A[i])
        money=money-stock*A[i]
        #print(i,money,stock)
    #売り戦略
    if A[i-1]<A[i] and A[i] >=A[i+1]:
        money=money+stock*A[i]
        stock=0
        #print(i,money,stock)
#N日目
if A[N-2]<A[N-1]:
    money=money+stock*A[N-1]
if A[N-2]>=A[N-1]:
    money=money+stock*A[N-2]
#print(N-1,money,stock)
print(money)