N = int(input())
sp_list = list(map(int, input().split()))
stock = 0
money = 1000
for i in range(N-1):
    p_today = sp_list[i]
    p_tomorrow = sp_list[i+1]
    if p_tomorrow > p_today:
        stock = money // p_today
        money = money % p_today
    if p_tomorrow < p_today:
        money += p_today * stock
        stock = 0

money += sp_list[N-1] * stock

print(money)
