https://www.acmicpc.net/problem/19698
import java.util.*
fun main(args: Array<String>) {
val s=Scanner(System.`in`)
var n=s.nextInt()
var w=s.nextInt()
var h=s.nextInt()
var l=s.nextInt()
w/=l
h/=l
var sum=w*h
if(n>=sum) print(sum)
else print(n)
}