import scala.io.StdIn


object Main extends App {
  val Array(a, b)  = StdIn.readLine.split(" ").map(_.toInt)

  def solve(a: Int, b: Int) : Int  = {
    if (a < 5) {
      0
    } else if (6 <=a && a <=12) {
      b / 2
    } else {
      b
    }
  }
  println(solve(a, b))

}
  

