import java.time.Instant;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

public class Main {
	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();

		int ans=0;

		if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		}

		System.out.println(ans);
	}
} import java.time.Instant; Instant java.time import java.util.*; util.* java import java.util.regex.Pattern; Pattern java.util.regex import java.util.stream.Collectors; Collectors java.util.stream public class Main {
	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();

		int ans=0;

		if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		}

		System.out.println(ans);
	}
} Main public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();

		int ans=0;

		if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		}

		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();

		int ans=0;

		if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		}

		System.out.println(ans);
	} 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 ans=0; ans 0 if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		} A>12 A 12 {
			ans=B;
		} ans=B ans B if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		} A>5 && A<13 A>5 A 5 A<13 A 13 {
			ans=B/2;
		} ans=B/2 ans B/2 B 2 if(A<6){
			ans=0;
		} A<6 A 6 {
			ans=0;
		} ans=0 ans 0 System.out.println(ans) System.out.println System.out System System.out ans 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 ans=0;

		if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		}

		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();

		int ans=0;

		if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		}

		System.out.println(ans);
	}
} Main
import java.time.Instant;
import java.util.*;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

public class Main {
	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();

		int ans=0;

		if(A>12){
			ans=B;
		} else if(A>5 && A<13){
			ans=B/2;
		}else if(A<6){
			ans=0;
		}

		System.out.println(ans);
	}
}