fun main(args: Array<String>) {
    abc056b()
}

fun abc056b() {
    val (w, aLeft, bLeft) = readLine()!!.split(" ").map { it.toInt() }
    val aRight = aLeft + w
    val bRight = bLeft + w

    val answer = if (bRight in aLeft..aRight || bLeft in aLeft..aRight) 0 else {
        if (aRight < bRight) bLeft - aRight else aLeft - bRight
    }

    println(answer)
}
