N = int(input())
A = [int(i) for i in input().split()]

money = 1000
stock = 0

for i in range(N-1):
    if A[i] < A[i+1]:
        stock = money // A[i]
        money = money - A[i] * stock
        # print("buy stocks; money=",money,", stock=",stock)
    else:
        money = money + A[i+1] * stock
        stock = 0
        # print("sell stocks; money=",money,", stock=",stock)

if stock != 0:
    # print("last;money stock",money,stock)
    # print(A[-1])
    money = money + A[-1] * stock
    stock = 0

# print("money=",money,", stock=",stock)

print(money)