object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val a,b = sc.nextInt
    if(a >= 13){
        println(b)
    }else if(a >= 6){
        println(b/2)
    }else{
        println(0)
    }
  }
}