import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int old = Integer.parseInt(str[0]);
		int price = Integer.parseInt(str[1]);

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


	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int old = Integer.parseInt(str[0]);
		int price = Integer.parseInt(str[1]);

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


	}

} Main public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int old = Integer.parseInt(str[0]);
		int price = Integer.parseInt(str[1]);

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


	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int old = Integer.parseInt(str[0]);
		int price = Integer.parseInt(str[1]);

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


	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int old = Integer.parseInt(str[0]); old Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int price = Integer.parseInt(str[1]); price Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if(old >= 13) {
			System.out.println(price);
		}else if(old <= 12 && old >= 6) {
			System.out.println(price/2);
		}else {
			System.out.println(0);
		} old >= 13 old 13 {
			System.out.println(price);
		} System.out.println(price) System.out.println System.out System System.out price if(old <= 12 && old >= 6) {
			System.out.println(price/2);
		}else {
			System.out.println(0);
		} old <= 12 && old >= 6 old <= 12 old 12 old >= 6 old 6 {
			System.out.println(price/2);
		} System.out.println(price/2) System.out.println System.out System System.out price/2 price 2 {
			System.out.println(0);
		} System.out.println(0) System.out.println System.out System System.out 0 String[] args args public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int old = Integer.parseInt(str[0]);
		int price = Integer.parseInt(str[1]);

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


	}

} public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int old = Integer.parseInt(str[0]);
		int price = Integer.parseInt(str[1]);

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


	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int old = Integer.parseInt(str[0]);
		int price = Integer.parseInt(str[1]);

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


	}

}
