fun main(args : Array<String>) {
    val n = readLine()!!.toLong()
    val a = readLine()!!.toLong()
    val b = readLine()!!.toLong()
    val c = readLine()!!.toLong()
    val d = readLine()!!.toLong()
    val e = readLine()!!.toLong()

    val min = listOf(a, b, c, d, e).min()!!

    var rest = n - min
    if (rest <= 0) {
        println(5)
        return
    }

    println(5L + (rest / min) + if (rest % min == 0L) 0L else 1L)
}