object Main extends App {
    var get = readLine.split(" ")
    var a = get(0).toInt
    var b = get(1).toInt
  if(a<6) {
    println(0)
  } else if(a<13){
      println(b/2)
  } else {
    println(b)
  }
}