object Main extends App {
  override def main(args: Array[String]): Unit = {
    val lines = io.Source.stdin.getLines().toStream
    println(solve(lines))
  }

  def solve(lines: Seq[String]): Int = {
    val Array(a, b) = lines.head.split(" ").map(_.toInt)
    // debug(a, b)
    if (a >= 13) {
      b
    } else if (6 <= a && a <= 12 ) {
      b/2
    }  else {
      0
    }
  }

  private def debug(x: Any): Unit = {
    if (System.getenv("LOCAL_DEBUG") != null) println(x)
  }
}