import java.math.BigDecimal
import java.math.RoundingMode

fun main(args: Array<String>) {
    val n = readLine()!!.toLong()
    val a = (1..5).map { readLine()!!.toLong() }.toTypedArray()
    println(solve(n, a))
}

private fun solve(n: Long, a: Array<Long>): Long {
    val min = findBottleNeck(a)
    val minVal = min.value
    val lot = BigDecimal.valueOf(n).divide(BigDecimal.valueOf(minVal), 0, RoundingMode.CEILING).toLong()
    return 4 + lot
}

private fun findBottleNeck(a: Array<Long>): IndexedValue<Long> {
    return a.withIndex().minBy { it.value }!!
}

