import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int price = 0;
		if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		}
		System.out.println(price);
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int price = 0;
		if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		}
		System.out.println(price);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int price = 0;
		if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		}
		System.out.println(price);
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int price = 0;
		if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		}
		System.out.println(price);
	} 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 int price = 0; price 0 if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		} a >= 13 a 13 {
			price = b;
		} price = b price b if(a >= 6){
			price = b / 2;
		} a >= 6 a 6 {
			price = b / 2;
		} price = b / 2 price b / 2 b 2 System.out.println(price) System.out.println System.out System System.out price String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int price = 0;
		if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		}
		System.out.println(price);
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int price = 0;
		if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		}
		System.out.println(price);
	}
} Main
import java.util.Scanner;
//import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int price = 0;
		if(a >= 13){
			price = b;
		}else if(a >= 6){
			price = b / 2;
		}
		System.out.println(price);
	}
}
