import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int cost = 0;

		if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		}
		System.out.println(cost);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int cost = 0;

		if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		}
		System.out.println(cost);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int cost = 0;

		if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		}
		System.out.println(cost);
	} main {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int cost = 0;

		if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		}
		System.out.println(cost);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan int cost = 0; cost 0 if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		} A >= 13 A 13 {
			cost = B ;
		} cost = B cost B if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		} 6 <=A && A<= 12 6 <=A 6 A A<= 12 A 12 {
			cost = B/2;
		} cost = B/2 cost B/2 B 2 {
			cost = 0;
		} cost = 0 cost 0 System.out.println(cost) System.out.println System.out System System.out cost String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int cost = 0;

		if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		}
		System.out.println(cost);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int cost = 0;

		if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		}
		System.out.println(cost);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int cost = 0;

		if (A >= 13) {
			cost = B ;
		} else if ( 6 <=A && A<= 12) {
			cost = B/2;
		} else {
			cost = 0;
		}
		System.out.println(cost);
	}
}