object Main {
  def main(args: Array[String]): Unit = {
      val sc = new java.util.Scanner(System.in)
      val x = sc.nextInt
      val y = sc.nextInt

    if (x >= 13) { println(y) }
    else if (x >= 6 && x <= 12) { println(y / 2) }
    else println(0)
  }
}