import java.util.*
import javax.print.attribute.IntegerSyntax
import kotlin.math.*

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readLong() = readLn().toLong() // single long
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map(String::toInt) // list of ints
private fun readLongs() = readStrings().map(String::toLong) // list of longs

data class C(val m: Long, val s: Long) {
    fun max(): Long = m + s * 200
    fun min(): Long = m + s * 100
}

fun main() {
    val n = readInt()
    val a = readInts()

    val t = mutableListOf<C>()

    t.add(C(1000, 0))

    for (i in 0 until n) {

        for (j in 0 until t.size) {
            val it = t[j]
            t.add(C(it.m + it.s * a[i], 0))
            val amount = it.m / a[i]
            t.add(C(it.m - amount * a[i], it.s + amount))
        }

        val min = t.map { it.min() }.max()!!
        t.removeIf { it.max() < min }
    }

    println(t.map { it.m }.max()!!)
}
