import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		sc.close();
		
		int ans = B;
		if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		}
		System.out.println(ans);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		sc.close();
		
		int ans = B;
		if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		sc.close();
		
		int ans = B;
		if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		}
		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		sc.close();
		
		int ans = B;
		if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = Integer.parseInt(sc.next()); A Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int B = Integer.parseInt(sc.next()); B Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc int ans = B; ans B if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		} A<=5 A 5 {
			ans = 0;
		} ans = 0 ans 0 if(A<=12) {
			ans = ans / 2;
		} A<=12 A 12 {
			ans = ans / 2;
		} ans = ans / 2 ans ans / 2 ans 2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		sc.close();
		
		int ans = B;
		if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		sc.close();
		
		int ans = B;
		if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int A = Integer.parseInt(sc.next());
		int B = Integer.parseInt(sc.next());
		sc.close();
		
		int ans = B;
		if(A<=5) {
			ans = 0;
		}else if(A<=12) {
			ans = ans / 2;
		}
		System.out.println(ans);
	}

}