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

stock = [0]*n
score = 1000
for i in range(len(A)):
    #print(i)
    if i != len(A)-1:
        if A[i] < A[i+1]:
            stock[i] = score // A[i]
            score -= ((score // A[i]) * A[i])
        
    if i != 0:
        if A[i-1] < A[i]:
            score += stock[i-1]*A[i]
            stock[i-1] = 0
    #print(stock)
    #print(score)
print(score)