n = gets().chomp().to_i
prices = gets().chomp().split(' ').map(&:to_i)
curr_money = 1000

buy_at, count = -1, 0
while count < n do
    if buy_at == -1
        buy_at = count
    else 
        if prices[buy_at] < prices[count]
            curr_money += (curr_money / prices[buy_at]) * (prices[count] - prices[buy_at])
            buy_at = -1
        else
            buy_at = count
        end
    end
    count += 1
end
puts curr_money