object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b = sc.nextInt
//  val xss = List.fill(rows, cols)(sc.nextInt)

  val ans =
    if (13 <= a) b
    else if (6 <= a && a <= 12) b / 2
    else 0

  println(ans)
}