Option Infer On
Imports System.Collections.Generic
Imports System.Console

Module Program
    Sub Main()
        Dim W = NextInt()
        Dim a = NextInt()
        Dim b = NextInt()
        Dim ans As Integer

        If b + W < a Then
            ans = Diff(b + W, a)
        ElseIf a + W < b Then
            ans = Diff(a + W, b)
        Else
            ans = 0
        End If

        WriteLine(ans)
    End Sub

    Function Diff(a As Integer, b As Integer) As Integer
        Return Math.Abs(a - b)
    End Function

    Function NextInt() As Integer
        Return CInt(NextString())
    End Function

    Function NextString() As String
        Dim result As New List(Of Char)
        Do
            Dim tmp = Read()
            If tmp < 0 Then Exit Do
            Dim nextChar = Chr(tmp)

            If Not Char.IsWhiteSpace(nextChar) Then
                result.Add(nextChar)
            ElseIf nextChar <> vbCr Then
                Exit Do
            End If
        Loop
        Return New String(result.ToArray())
    End Function

End Module
