defmodule Main do def main do 1..2 |> Enum.map(fn _ -> IO.read(:line) |> String.split() |> Enum.map(&String.to_integer/1) end) |> solve |> IO.puts() end defp solve([[px, py], [qx, qy]]) do (((px - qx) |> abs) + ((py - qy) |> abs)) / 2 end end