import Control.Applicative ((<$>))


computeFee :: Integral a => a -> a -> a
computeFee a b
    | a >= 13 = b
    | a >= 6 = div b 2
    | otherwise = 0


main :: IO ()
main = do
    [a, b] <- fmap read . words <$> getLine :: IO [Int]
    print $ computeFee a b
