import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int A = Integer.parseInt(tmp[0]);
		int B = Integer.parseInt(tmp[1]);

		if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		}
	}



} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int A = Integer.parseInt(tmp[0]);
		int B = Integer.parseInt(tmp[1]);

		if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		}
	}



} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int A = Integer.parseInt(tmp[0]);
		int B = Integer.parseInt(tmp[1]);

		if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int A = Integer.parseInt(tmp[0]);
		int B = Integer.parseInt(tmp[1]);

		if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] tmp = br.readLine().split(" "); tmp br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int A = Integer.parseInt(tmp[0]); A Integer.parseInt(tmp[0]) Integer.parseInt Integer tmp[0] tmp 0 int B = Integer.parseInt(tmp[1]); B Integer.parseInt(tmp[1]) Integer.parseInt Integer tmp[1] tmp 1 if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		} A<=5 A 5 {
			System.out.println(0);
		} System.out.println(0) System.out.println System.out System System.out 0 if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		} A<=12 A 12 {
			System.out.println(B/2);
		} System.out.println(B/2) System.out.println System.out System System.out B/2 B 2 {
			System.out.println(B);
		} System.out.println(B) System.out.println System.out System System.out B String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int A = Integer.parseInt(tmp[0]);
		int B = Integer.parseInt(tmp[1]);

		if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		}
	}



} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int A = Integer.parseInt(tmp[0]);
		int B = Integer.parseInt(tmp[1]);

		if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		}
	}



} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int A = Integer.parseInt(tmp[0]);
		int B = Integer.parseInt(tmp[1]);

		if(A<=5){
			System.out.println(0);
		}else if(A<=12){
			System.out.println(B/2);
		}else{
			System.out.println(B);
		}
	}



}
