Scanf.scanf "%d %d %d %d" (fun a b c d -> Printf.printf "%d\n" @@ min (d / (c + 1)) (min a (b / c)) )