defmodule Main do def main do IO.read(:line) |> String.split() |> Enum.map(&String.to_integer/1) |> solve |> IO.puts() end defp solve([v, m, r, l]) do [v, m |> div(r), l |> div(r + 1)] |> Enum.min() end end