require 'set'; require 'prime'; require 'pp'
INF=Float::INFINITY; MOD=10**9+7
n = gets.chomp.to_i
a = gets.chomp.split.map(&:to_i)

money = 1000
cur = INF
a.each do |yen|
  if cur >= yen
    cur = yen
  else
    suu = (money / cur)
    money = money + suu * (yen - cur)
    cur = yen
  end
  # p [yen, money]
end

puts money

