let readIntArray _ =
    stdin.ReadLine().Split(" ") |> Array.map int

readIntArray ()
|> fun [| w; a; b |] ->
    if (a + w > b && a < b) || (b + w > a && b < a)
    then 0
    elif a < b
    then b - a - w
    else a - b - w
|> printfn "%d"
