import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		
		int c = 0;
		if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		}
		
		System.out.println(c);
		
		sc.close();
		
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		
		int c = 0;
		if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		}
		
		System.out.println(c);
		
		sc.close();
		
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		
		int c = 0;
		if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		}
		
		System.out.println(c);
		
		sc.close();
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		
		int c = 0;
		if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		}
		
		System.out.println(c);
		
		sc.close();
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int c = 0; c 0 if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		} A>=13 A 13 {
			c = B;
		} c = B c B if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		} A>=6 A 6 {
			c = B/2;
		} c = B/2 c B/2 B 2 {
			c = 0;
		} c = 0 c 0 System.out.println(c) System.out.println System.out System System.out c sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		
		int c = 0;
		if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		}
		
		System.out.println(c);
		
		sc.close();
		
	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		
		int c = 0;
		if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		}
		
		System.out.println(c);
		
		sc.close();
		
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		
		int c = 0;
		if(A>=13) {
			c = B;
		}else if(A>=6) {
			c = B/2;
		}else {
			c = 0;
		}
		
		System.out.println(c);
		
		sc.close();
		
	}

}