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 res ;

        if (a<=5) {
        	res = 0;            	
        }else if (a<=12) {
        	res = b/2; 
        }else {
        	res = b;
        } 
      System.out.println(res);
    }
} 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 res ;

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

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

        if (a<=5) {
        	res = 0;            	
        }else if (a<=12) {
        	res = b/2; 
        }else {
        	res = b;
        } 
      System.out.println(res);
    } 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 res ; res if (a<=5) {
        	res = 0;            	
        }else if (a<=12) {
        	res = b/2; 
        }else {
        	res = b;
        } a<=5 a 5 {
        	res = 0;            	
        } res = 0 res 0 if (a<=12) {
        	res = b/2; 
        }else {
        	res = b;
        } a<=12 a 12 {
        	res = b/2; 
        } res = b/2 res b/2 b 2 {
        	res = b;
        } res = b res b System.out.println(res) System.out.println System.out System System.out res 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 res ;

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

        if (a<=5) {
        	res = 0;            	
        }else if (a<=12) {
        	res = b/2; 
        }else {
        	res = b;
        } 
      System.out.println(res);
    }
} Main
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 res ;

        if (a<=5) {
        	res = 0;            	
        }else if (a<=12) {
        	res = b/2; 
        }else {
        	res = b;
        } 
      System.out.println(res);
    }
}
