import java.util.*;

public class Main {

	static HashMap<Integer, ArrayList<Integer>> map;
	static boolean[] reached;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();

		System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B));
	}

	public static void println(Object o) {
		System.out.println(o);
	}
} import java.util.*; util.* java public class Main {

	static HashMap<Integer, ArrayList<Integer>> map;
	static boolean[] reached;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();

		System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B));
	}

	public static void println(Object o) {
		System.out.println(o);
	}
} Main static HashMap<Integer, ArrayList<Integer>> map; map static boolean[] reached; reached public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();

		System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B));
	} main {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();

		System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B));
	} 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 System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B)) System.out.println System.out System System.out (A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B) (A >= 6 && A <= 12) A >= 6 A 6 A <= 12 A 12 B/2 B 2 (A<=5 ? 0 : B) A<=5 A 5 0 B String[] args args public static void println(Object o) {
		System.out.println(o);
	} println {
		System.out.println(o);
	} System.out.println(o) System.out.println System.out System System.out o Object o o public class Main {

	static HashMap<Integer, ArrayList<Integer>> map;
	static boolean[] reached;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();

		System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B));
	}

	public static void println(Object o) {
		System.out.println(o);
	}
} public class Main {

	static HashMap<Integer, ArrayList<Integer>> map;
	static boolean[] reached;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();

		System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B));
	}

	public static void println(Object o) {
		System.out.println(o);
	}
} Main
import java.util.*;

public class Main {

	static HashMap<Integer, ArrayList<Integer>> map;
	static boolean[] reached;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();

		System.out.println((A >= 6 && A <= 12) ? B/2 : (A<=5 ? 0 : B));
	}

	public static void println(Object o) {
		System.out.println(o);
	}
}