import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

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

		System.out.println(ans);

   		sc.close();
        return ;

    }
    
}
 import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util 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 ans = 0;
		
		if((A>=6)&(A<=12)){
			ans = B / 2;
		}else if(A>=13){
			ans = B;
		}

		System.out.println(ans);

   		sc.close();
        return ;

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

		System.out.println(ans);

   		sc.close();
        return ;

    } main {
    	
		Scanner sc = new Scanner(System.in);
		// 整数の入力　年齢
		int A = sc.nextInt();
		// 整数の入力　料金
		int B = sc.nextInt();
		
		int ans = 0;
		
		if((A>=6)&(A<=12)){
			ans = B / 2;
		}else if(A>=13){
			ans = B;
		}

		System.out.println(ans);

   		sc.close();
        return ;

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

		System.out.println(ans);

   		sc.close();
        return ;

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

		System.out.println(ans);

   		sc.close();
        return ;

    }
    
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

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

		System.out.println(ans);

   		sc.close();
        return ;

    }
    
}

