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 b = new Array[Long](5)

	for(i<-0 until 5){
		b(i) = (n + a(i) - 1L)/a(i)
	}

	println(4 + b.max)

}