import Control.Applicative
import Control.Monad
 
main :: IO ()
main = do
    [a, b] <- map read . words <$> getLine
    putStrLn $ show (solve a b)
    
solve :: Int -> Int -> Int 
solve a b = if a <= 5 then 0
            else if a <= 12 then div b 2
            else b