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

getsolve :: Int -> Int -> Int -> Int
getsolve w a b
    | br < al			= al - br
    | ar < bl			= bl - ar
    | otherwise			= 0
    where al = a
          ar = a + w
          bl = b
          br = b + w



