package main import "fmt" func min(a, b int) int { if a >= b { return b } return a } func main() { var a, b, c, d int fmt.Scan(&a, &b, &c, &d) fmt.Println(min(a, min(b/c, d/(1+c)))) }