N = int(input())
A = [int(X) for X in input().split()]
Stock = 0
Money = 1000
for T in range(N-1):
    if A[T+1]>A[T]:
        Stock = Money//A[T]
        Money -= Stock*A[T]  
    elif A[T+1]<A[T]:
        Money += Stock*A[T]
        Stock = 0
if Stock>0:
    Money += Stock*A[N-1]
    Stock = 0
print(Money)