import scala.io.{StdIn => in}

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

  val ans = a match {
    case a if a <= 5 => 0
    case a if a <= 12 => b / 2
    case _ => b
  }

  println(ans)
}