
solve' x
  | x <= 0    = 0
  | otherwise = x

solve w a b
  | a < b  = b - (a + w)
  | a >= b = a - (b + w)

main = do
  line <- getLine
  let [w, a, b] = fmap (read :: String -> Int) $ words line in
    putStrLn $ show $ solve' $ solve w a b
