import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
    [w, a, b] <- fmap read . words <$> getLine :: IO [Int]
    let p1 = b <= a + w
    let p2 = a <= b + w
    let c = abs $ b - (a + w)
    let d = abs $ (b + w) - a
    if and [p1, p2]
        then print 0
        else print $ min c d