fun main(args: Array<String>) = yorukatsu8c()

fun yorukatsu8c() {
    val n = readLine()!!.toLong()
    val list = Array(5) { readLine()!!.toLong() }

    val answer = 4 + list.map { Math.ceil(n.toDouble() / it.toDouble()).toLong() }.max()!!

    println(answer)
}
