fun main(args: Array<String>) {
    val n = readLine()!!.toLong()
    val plist = (1..5).map { readLine()!!.toLong() }

    val min = plist.min()!!

    val c = if((n % min).toInt() == 0) n/min - 1 else n/min
    println(5 + c)
}