import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

readInt = fst . fromJust . BS.readInteger
getIntList = map readInt . BS.words <$> BS.getLine
getIntMatrix = map (map readInt . BS.words) . BS.lines <$> BS.getContents

main = do
  [age,regularPrice] <- getIntList
  print $ price age regularPrice

price age regularPrice
  | age >= 13 = regularPrice
  | age <= 5 = 0
  | otherwise = regularPrice `div` 2