

import java.util.Scanner;

public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int X = B;
		if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		}

		System.out.println(X);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int X = B;
		if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		}

		System.out.println(X);

	}
} Main private static Scanner sc; sc public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int X = B;
		if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		}

		System.out.println(X);

	} main {
		sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int X = B;
		if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		}

		System.out.println(X);

	} 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 X = B; X B if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		} A >= 13 A 13 {
			X = B;
		} X = B X B if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		} 6 <= A && A <= 12 6 <= A 6 A A <= 12 A 12 {
			X = B / 2;
		} X = B / 2 X B / 2 B 2 if (A <= 5) {
			X = 0;
		} A <= 5 A 5 {
			X = 0;
		} X = 0 X 0 System.out.println(X) System.out.println System.out System System.out X String[] args args public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int X = B;
		if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		}

		System.out.println(X);

	}
} public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int X = B;
		if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		}

		System.out.println(X);

	}
} Main


import java.util.Scanner;

public class Main {
	private static Scanner sc;

	public static void main(String[] args) throws Exception {
		sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int X = B;
		if (A >= 13) {
			X = B;
		} else if (6 <= A && A <= 12) {
			X = B / 2;
		} else if (A <= 5) {
			X = 0;
		}

		System.out.println(X);

	}
}
