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

solve :: Int -> Int -> Int -> Int
solve w a b = if a' + w > b'
              then 0
              else b' - (a'+w)
  where
    a' = min a b
    b' = max a b
