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 in = new BufferedReader(new FileReader(new File("input.txt")));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int a = Integer.valueOf(line[0]);
		int b = Integer.valueOf(line[1]);
		if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		}
	}
} 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 in = new BufferedReader(new FileReader(new File("input.txt")));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int a = Integer.valueOf(line[0]);
		int b = Integer.valueOf(line[1]);
		if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		}
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {
		//BufferedReader in = new BufferedReader(new FileReader(new File("input.txt")));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int a = Integer.valueOf(line[0]);
		int b = Integer.valueOf(line[1]);
		if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		}
	} main {
		//BufferedReader in = new BufferedReader(new FileReader(new File("input.txt")));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int a = Integer.valueOf(line[0]);
		int b = Integer.valueOf(line[1]);
		if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] line = in.readLine().split(" "); line in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int a = Integer.valueOf(line[0]); a Integer.valueOf(line[0]) Integer.valueOf Integer line[0] line 0 int b = Integer.valueOf(line[1]); b Integer.valueOf(line[1]) Integer.valueOf Integer line[1] line 1 if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		} a <= 5 a 5 {
			System.out.println("0");
		} System.out.println("0") System.out.println System.out System System.out "0" if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		} a <= 12 a 12 {
			System.out.println(b/2);
		} System.out.println(b/2) System.out.println System.out System System.out b/2 b 2 {
			System.out.println(b);
		} System.out.println(b) System.out.println System.out System System.out b String[] args args public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		//BufferedReader in = new BufferedReader(new FileReader(new File("input.txt")));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int a = Integer.valueOf(line[0]);
		int b = Integer.valueOf(line[1]);
		if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		}
	}
} public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		//BufferedReader in = new BufferedReader(new FileReader(new File("input.txt")));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int a = Integer.valueOf(line[0]);
		int b = Integer.valueOf(line[1]);
		if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		}
	}
} 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 in = new BufferedReader(new FileReader(new File("input.txt")));
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] line = in.readLine().split(" ");
		int a = Integer.valueOf(line[0]);
		int b = Integer.valueOf(line[1]);
		if(a <= 5) {
			System.out.println("0");
		}else if(a <= 12) {
			System.out.println(b/2);
		}else {
			System.out.println(b);
		}
	}
}