import scala.io.StdIn

object Main {

  def main(args: Array[String]) {
    val Array(a, b): Array[Int] = StdIn.readLine().split(" ").map(e => e.toInt)

    if (a <= 5) {
      println(0)
    } else if (a <= 12) {
      println(b / 2)
    } else {
      println(b)
    }

  }

}

