fun main(args:Array<String>){
    val line = readLine()!!.split(" ").map{it.toInt()}
    val a = line[0]
    val b = line[1]
    val result = when(a){
        in 0..5 ->0
        in 6..12 -> b/2
        else -> b
    }
    println(result)
}