object Main extends App {

  val Array(a, b) = scala.io.StdIn.readLine().split(" ").map(_.toInt)


  def solve() = a match {
    case x if (x > 13) => b
    case x if (6 <= x && x <= 12) => b / 2
    case _ => 0
  }

  println(solve)

}