fun main(args : Array<String>){
    val (W, a, b) = readLine()!!.split(' ').map{it.toInt()}
    val (left, right) = listOf(a, b).sorted()

    when(right){
        in left + 0..W -> println(0)
        else -> println(right - left - W)
    }
}