import Control.Applicative
import Control.Monad
import Data.Functor
import Data.List
import Data.Char

solve [a, b]
  | a>=13 = b
  | a>=6 = div b 2
  | otherwise = 0

main = solve <$> (map read . words <$> getLine) >>= print