import java.util.Scanner

import scala.annotation.tailrec

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

    val a = if (A <= 5) 0
    else if (A >= 6 && A <= 12) B/2
    else B

    println(a)
  }
}