import java.util.Scanner;

public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int age = Integer.parseInt(line[0]);
		int price = Integer.parseInt(line[1]);
		
		int result =0 ;
		if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		}
		
		System.out.println(result);

		
		
		
	}
}
	
	 import java.util.Scanner; Scanner java.util public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int age = Integer.parseInt(line[0]);
		int price = Integer.parseInt(line[1]);
		
		int result =0 ;
		if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		}
		
		System.out.println(result);

		
		
		
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int age = Integer.parseInt(line[0]);
		int price = Integer.parseInt(line[1]);
		
		int result =0 ;
		if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		}
		
		System.out.println(result);

		
		
		
	} main {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int age = Integer.parseInt(line[0]);
		int price = Integer.parseInt(line[1]);
		
		int result =0 ;
		if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		}
		
		System.out.println(result);

		
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] line = sc.nextLine().split(" "); line sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int age = Integer.parseInt(line[0]); age Integer.parseInt(line[0]) Integer.parseInt Integer line[0] line 0 int price = Integer.parseInt(line[1]); price Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 int result =0 ; result 0 if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		} age <= 5 age 5 {
			result = 0;
		} result = 0 result 0 if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		} 6<= age && age <= 12 6<= age 6 age age <= 12 age 12 {
			result = price/2;
		} result = price/2 result price/2 price 2 if(13 <= age) {
			result = price;
		} 13 <= age 13 age {
			result = price;
		} result = price result price System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int age = Integer.parseInt(line[0]);
		int price = Integer.parseInt(line[1]);
		
		int result =0 ;
		if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		}
		
		System.out.println(result);

		
		
		
	}
} public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int age = Integer.parseInt(line[0]);
		int price = Integer.parseInt(line[1]);
		
		int result =0 ;
		if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		}
		
		System.out.println(result);

		
		
		
	}
} Main
import java.util.Scanner;

public class Main { 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int age = Integer.parseInt(line[0]);
		int price = Integer.parseInt(line[1]);
		
		int result =0 ;
		if(age <= 5) {
			result = 0;
		}else if(6<= age && age <= 12) {
			result = price/2;
		}else if(13 <= age) {
			result = price;
		}
		
		System.out.println(result);

		
		
		
	}
}
	
	