defmodule Main do def main do IO.read(:line) |> String.trim() |> String.split() |> Enum.map(&String.to_integer/1) |> solve |> IO.puts() end def solve([a, b]) do cond do a == b || 2 * a == b -> 4 a < b && b < 2 * a -> 8 true -> 0 end end end