func main() var a: int :: cui@inputInt() var b: int :: cui@inputInt() var c: int :: cui@inputInt() var d: int :: cui@inputInt() var ans: int :: [a, b / c, d / (c + 1)].min() do cui@print("\{ans}\n") end func