object Main {

  def main(args: Array[String]): Unit = {
    import scala.io.StdIn._

    val Array(a, b) = readLine().split(" ").map(_.toInt)
    println(if (a >= 13) b
    else if (a >= 6 && a <= 12) b / 2
    else 0)

  }

}