import java.util.Scanner

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

    val a = sc.nextInt
    val b = sc.nextInt

    val res =
      if(a >= 13) b
      else if (a >= 6) b /2
      else 0

    println(res)
  }
}
