n = int(input())
a = list(map(int, input().split()))
money  = 1000
stock = 0
min_price = 200
max_price = 100

for i in range(n):
    if a[i] <= min_price:
        min_price = a[i]
    else:
        if a[i] >= max_price:
            max_price = a[i]
            if i == n - 1:
                money = (money // min_price) * max_price + money % min_price
        else:
            money = (money // min_price) * max_price + money % min_price
            min_price = a[i]
            max_price = a[i]
print(money)
