import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

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

rect w a b | a<b = judge w a b | otherwise = judge w b a
judge w x y | y-x-w<=0 =0 | otherwise = y-x-w