N = int(input())
A = list(map(int,input().split()))
money = 1000
kabu = 0
for i in range(N-1):
    if A[i+1] <= A[i]:
        money += A[i] * kabu
        kabu = 0
    else:
        kabu = money//A[i]
        money -= A[i] * (money//A[i])
    #print(kabu,money)
money += A[-1] * kabu


print(money)
