import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		}
	}
} Main public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		}
	} main {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		}
	} try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		} {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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 c = 0; c 0 if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			} a <= 5 a 5 {
				c = 0;
			} c = 0 c 0 if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			} 5 < a && a <= 12 5 < a 5 a a <= 12 a 12 {
				c = b/2;
			} c = b/2 c b/2 b 2 if (12 < a) {
				c = b;
			} 12 < a 12 a {
				c = b;
			} c = b c b System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		}
	}
} public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		try (Scanner sc = new Scanner(System.in)) {
			
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = 0;
			
			if (a <= 5) {
				c = 0;
			}
			else if (5 < a && a <= 12) {
				c = b/2;
			} else if (12 < a) {
				c = b;
			}
			System.out.println(c);		
		}
	}
}