n = gets.to_i
a = [0] + gets.split(" ").map(&:to_i)
INF = Float::INFINITY
yen = 1000
(1..(n-1)).each do |i|
  if a[i] < a[i+1]
    stock = yen / a[i]
    yen += (a[i+1] - a[i]) * stock
  end
end
puts yen