defmodule Main do def main do [a, b, c] = IO.read(:line) |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1) solve(a, b, c) |> IO.puts() end def solve(a, b, c) do [b - a, b - c, abs(a - c)] |> Enum.min() end end