import Data.Maybe (fromJust) import qualified Data.ByteString.Char8 as BSC8 readInts :: IO [Integer] readInts = map (fst . fromJust . BSC8.readInteger) . BSC8.words <$> BSC8.getLine main :: IO () main = do (s:k:_) <- readInts print $ if (s - k) `mod` 2 == 0 then 0 else s - k