solve :: Int -> Int -> Int
solve a b
    | a <= 5    = 0
    | a <= 12   = div b 2
    | otherwise = b

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