import Control.Monad

readIntLine :: IO ([Int])
readIntLine = do
    x <- getLine
    return $ map (read :: String -> Int) $ words x

main :: IO ()
main = do
    [a,b] <- readIntLine
    print $ solve a b

solve a b
    | a < 6  = 0
    | a < 13 = div b 2
    | otherwise = b
