defmodule Main do
  def main do
    IO.gets("")
    |> String.trim()
    |> String.split()
    |> Enum.map(&String.to_integer/1)
    |> process()
    |> IO.puts()
  end
  
  def process([w, a, b]) when a < b and b - (a + w) < 0, do: 0
  def process([w, a, b]) when a > b and a - (b + w) < 0, do: 0
  def process([w, a, b]) when a < b, do: b - (a + w)
  def process([w, a, b]) when a > b, do: a - (b + w)
  def process(_), do: 0
end