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

money = 1000
stock = 0

for i in range(N):
    if money > A[i] and i<=N-2:
        if A[i]<A[i+1]:
            stock += money//A[i]
            money -= (money//A[i]) * A[i]
        
    if stock > 0 and i>=1:
        if A[i] > A[i-1]:
            money += stock * A[i]
            stock -= stock
        
print(money)