import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int M = sc.nextInt();
	    
	    if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M);
	    
	    sc.close();

	}
	

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int M = sc.nextInt();
	    
	    if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M);
	    
	    sc.close();

	}
	

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int M = sc.nextInt();
	    
	    if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M);
	    
	    sc.close();

	} main {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int M = sc.nextInt();
	    
	    if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M);
	    
	    sc.close();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M); N<=5 N 5 System.out.println(0) System.out.println System.out System System.out 0 if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M); N<=12 N 12 System.out.println(M/2) System.out.println System.out System System.out M/2 M 2 System.out.println(M) System.out.println System.out System System.out M sc.close() sc.close sc String[] args args public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int M = sc.nextInt();
	    
	    if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M);
	    
	    sc.close();

	}
	

} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int M = sc.nextInt();
	    
	    if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M);
	    
	    sc.close();

	}
	

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int M = sc.nextInt();
	    
	    if (N<=5)
	    	System.out.println(0);
	    else if (N<=12)
	    	System.out.println(M/2);
	    else
	    	System.out.println(M);
	    
	    sc.close();

	}
	

}