import scala.io.StdIn._

object Main extends App {

  val n = readInt()
  val A = readLine().split(" ").map(_.toInt)

  def solve() = {
    var curMoney = 1000
    for(i <- 0 until n-1) {
      if(A(i) < A(i+1)) {
        val stock = curMoney / A(i)
        curMoney %= A(i)
        curMoney += stock * A(i+1)
      }
    }
    curMoney
  }


  println(solve())

}

