import java.util.Scanner;
class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力


		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(a >= 13){
			System.out.println(b);
		}else if(6 <= a && a <= 12){
			System.out.println(b/2);
		}else{
			System.out.println(0);
		}
	}


	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}





}



class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
}

 import java.util.Scanner; Scanner java.util class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力


		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(a >= 13){
			System.out.println(b);
		}else if(6 <= a && a <= 12){
			System.out.println(b/2);
		}else{
			System.out.println(0);
		}
	}


	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}





} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力


		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(a >= 13){
			System.out.println(b);
		}else if(6 <= a && a <= 12){
			System.out.println(b/2);
		}else{
			System.out.println(0);
		}
	} main {
		Scanner sc = new Scanner(System.in);			//文字の入力


		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(a >= 13){
			System.out.println(b);
		}else if(6 <= a && a <= 12){
			System.out.println(b/2);
		}else{
			System.out.println(0);
		}
	} 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 if(a >= 13){
			System.out.println(b);
		}else if(6 <= a && a <= 12){
			System.out.println(b/2);
		}else{
			System.out.println(0);
		} a >= 13 a 13 {
			System.out.println(b);
		} System.out.println(b) System.out.println System.out System System.out b if(6 <= a && a <= 12){
			System.out.println(b/2);
		}else{
			System.out.println(0);
		} 6 <= a && a <= 12 6 <= a 6 a 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(0);
		} System.out.println(0) System.out.println System.out System System.out 0 String[] args args static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	} gcd {				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	} if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		} b == 0 b 0 {
			return a;
		} return a; a {
			return gcd(b, a%b);
		} return gcd(b, a%b); gcd(b, a%b) gcd b a%b a b int a a int b b class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
} Pair int from; from int end; end @Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	} compareTo {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	} Pair otherpair = (Pair)other; otherpair (Pair)other return from - otherpair.from; from - otherpair.from from otherpair.from otherpair otherpair.from Object other other Comparable
import java.util.Scanner;
class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力


		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(a >= 13){
			System.out.println(b);
		}else if(6 <= a && a <= 12){
			System.out.println(b/2);
		}else{
			System.out.println(0);
		}
	}


	static int gcd(int a,int b){				//最大公約数を返す
		if(b == 0){
			return a;
		}else{
			return gcd(b, a%b);
		}
	}





}



class Pair implements Comparable{
	int from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return from - otherpair.from;
	}
}


