n = gets.to_i
a = gets.split.map(&:to_i)
dp = Array.new(n + 1)
dp[0] = 1000
a << 0

1.upto(n) do |i|
  0.upto(i - 1).each do |j|
    dp[i] = [dp[j] / a[j] * a[i] + dp[j] % a[j], dp[j]].max
  end
end

puts dp[n]