solve :: Integral a => a -> a -> a -> a
solve w a b
    | a + w < b = b - a - w
    | b + w < a = a - b - w
    | otherwise = 0

main :: IO ()
main = do
    [w, a, b] <- fmap read . words <$> getLine :: IO [Int]
    print $ solve w a b
