import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Control.Monad.ST
import Data.List
import Data.Maybe (fromJust)

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

main :: IO ()
main = do
    (w:a:b:_) <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    print $ solve w a b