import qualified Data.ByteString.Char8 as BS

main = do
    -- numbers <- map (BS.unpack) . BS.words <$> BS.getLine
    -- numbers <- map (read . BS.unpack) . BS.words <$> BS.getLine
    [a,b] <- map (read . BS.unpack) . BS.words <$> BS.getLine :: IO [Int]
    -- let num_i = (read . BS.unpack) num :: In
    -- putStrLn $ show $ a * b
    putStrLn $ show $ max (a - b * 2) 0
    -- putStrLn $ show $ numbers !! 0