object Main {
  def main(args:Array[String]) = {
   // val seq = readLine.split("")
    val input=io.Source.stdin.getLines().mkString("\n")
    println(solve(input).trim())
  }

def solve(aaa:String): String={
  val seq = aaa.split(" ").map(_ .toInt)
  val ret = if(seq(0) <= 5){
  	"0"
  } else if (seq(0) <= 12 ){
  	(seq(1)/2).toString
  }else{
  seq(1).toString
  }
  ret
}
}
