import scala.io.StdIn.{readInt,readDouble}

object Main extends App {
  val l = readInt
  val a = readDouble
  val b = readDouble
  val c = readDouble
  val d = readDouble
  println(l-Math.max(Math.ceil(a/c),Math.ceil(b/d)).toInt)
}