import java.util.Scanner;
public class Main {

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

	}

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

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

	}

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

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

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

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

	}

} public class Main {

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

	}

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

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

	}

}