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

    val money = A match {
      case A if A < 6 => 0
      case A if A < 13 => B / 2
      case _ => B
    }

    println(money)
  }
}