import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String[] inputs = scanner.nextLine().split(" ", 0);
		int A = Integer.parseInt(inputs[0]);
		int B = Integer.parseInt(inputs[1]);
		if(A <= 5) {
			System.out.println("0");
		}else if(A <= 12) {
			System.out.println(B / 2);
		}else{
			System.out.println(B);
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String[] inputs = scanner.nextLine().split(" ", 0);
		int A = Integer.parseInt(inputs[0]);
		int B = Integer.parseInt(inputs[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) {
		Scanner scanner = new Scanner(System.in);
		String[] inputs = scanner.nextLine().split(" ", 0);
		int A = Integer.parseInt(inputs[0]);
		int B = Integer.parseInt(inputs[1]);
		if(A <= 5) {
			System.out.println("0");
		}else if(A <= 12) {
			System.out.println(B / 2);
		}else{
			System.out.println(B);
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		String[] inputs = scanner.nextLine().split(" ", 0);
		int A = Integer.parseInt(inputs[0]);
		int B = Integer.parseInt(inputs[1]);
		if(A <= 5) {
			System.out.println("0");
		}else if(A <= 12) {
			System.out.println(B / 2);
		}else{
			System.out.println(B);
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String[] inputs = scanner.nextLine().split(" ", 0); inputs scanner.nextLine().split(" ", 0) scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " 0 int A = Integer.parseInt(inputs[0]); A Integer.parseInt(inputs[0]) Integer.parseInt Integer inputs[0] inputs 0 int B = Integer.parseInt(inputs[1]); B Integer.parseInt(inputs[1]) Integer.parseInt Integer inputs[1] inputs 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
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String[] inputs = scanner.nextLine().split(" ", 0);
		int A = Integer.parseInt(inputs[0]);
		int B = Integer.parseInt(inputs[1]);
		if(A <= 5) {
			System.out.println("0");
		}else if(A <= 12) {
			System.out.println(B / 2);
		}else{
			System.out.println(B);
		}
	}
}