object Main extends App {
	val n = scala.io.StdIn.readLong
	val a = new Array[Long](5)

	for(i<-0 until 5){
		a(i) = scala.io.StdIn.readLong
	}

	val tp = n / a.min

	if(tp == 0) println(5)
	else println(tp + 5L)

}