import           Control.Monad
import           Data.Array
import qualified Data.ByteString.Char8         as BS
import           Data.List
import           Data.Maybe
import           Data.Ord

readInts :: IO [Int]
readInts = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine

main :: IO ()
main = do
  (a : b : _) <- readInts
  print $ solve a b

solve :: (Integral a1, Num a2, Ord a2) => a2 -> a1 -> a1
solve a b | 13 <= a   = b
          | 6 <= a    = b `div` 2
          | otherwise = 0
