import scala.io.{StdIn => in}

object Main extends App {
  val n = in.readLong
  val city = Iterator.continually(in.readLong)
    .take(5)
    .toArray

  val p = (0 until 5).map(i => (n + city(i)-1) / city(i)).max
  val ans = 5 + p - 1
  println(ans)
}