https://www.acmicpc.net/problem/5532
import java.util.*
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var l=s.nextInt()
var a=s.nextInt()
var b=s.nextInt()
var c=s.nextInt()
var d=s.nextInt()
var sum:Int
var sum1:Int
if(a%c==0) sum=a/c
else sum=a/c+1
if(b%d==0) sum1=b/d
else sum1=b/d+1
print(Math.min(l-sum,l-sum1))
}