main = do
  li <- getLine
  let [age, fee] = map read $ words li
  let answer = compute age fee
  print answer

compute :: Int -> Int -> Int
compute age fee
  | age >= 13 = fee
  | age >=  6 = fee `div` 2
  | otherwise = 0
