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

movements = ['bull' if A[i+1]>A[i] else 'bear' for i in range(N-1)]
movements.append('bear')
#print(movements)

money = 1000
stock = 0
for i in range(N):
    if movements[i] == 'bull':
        stock = money // A[i]
        money = money % A[i]
#        print(i, money, stock)
    elif stock > 0:
        money += A[i] * stock
        stock = 0
#        print(i, money, stock)
    else:
        pass
#        print(i, 'no move')

print(money)
