import java.util.Scanner;

class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        //sc.nextLine();
        //sc.close();
        String[] n  = str.split(" ");
        int a = Integer.parseInt(n[0]);
        int b = Integer.parseInt(n[1]);
        int fee = 0;
        if( a <= 5 ){
            fee = 0;
        } else if ( a >= 6 && a <= 12){
            fee = b / 2;
        } else {
            fee = b;
        }
        System.out.println(fee);
    } 
}   import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        //sc.nextLine();
        //sc.close();
        String[] n  = str.split(" ");
        int a = Integer.parseInt(n[0]);
        int b = Integer.parseInt(n[1]);
        int fee = 0;
        if( a <= 5 ){
            fee = 0;
        } else if ( a >= 6 && a <= 12){
            fee = b / 2;
        } else {
            fee = b;
        }
        System.out.println(fee);
    } 
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        //sc.nextLine();
        //sc.close();
        String[] n  = str.split(" ");
        int a = Integer.parseInt(n[0]);
        int b = Integer.parseInt(n[1]);
        int fee = 0;
        if( a <= 5 ){
            fee = 0;
        } else if ( a >= 6 && a <= 12){
            fee = b / 2;
        } else {
            fee = b;
        }
        System.out.println(fee);
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        //sc.nextLine();
        //sc.close();
        String[] n  = str.split(" ");
        int a = Integer.parseInt(n[0]);
        int b = Integer.parseInt(n[1]);
        int fee = 0;
        if( a <= 5 ){
            fee = 0;
        } else if ( a >= 6 && a <= 12){
            fee = b / 2;
        } else {
            fee = b;
        }
        System.out.println(fee);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] n  = str.split(" "); n str.split(" ") str.split str " " int a = Integer.parseInt(n[0]); a Integer.parseInt(n[0]) Integer.parseInt Integer n[0] n 0 int b = Integer.parseInt(n[1]); b Integer.parseInt(n[1]) Integer.parseInt Integer n[1] n 1 int fee = 0; fee 0 if( a <= 5 ){
            fee = 0;
        } else if ( a >= 6 && a <= 12){
            fee = b / 2;
        } else {
            fee = b;
        } a <= 5 a 5 {
            fee = 0;
        } fee = 0 fee 0 if ( a >= 6 && a <= 12){
            fee = b / 2;
        } else {
            fee = b;
        } a >= 6 && a <= 12 a >= 6 a 6 a <= 12 a 12 {
            fee = b / 2;
        } fee = b / 2 fee b / 2 b 2 {
            fee = b;
        } fee = b fee b System.out.println(fee) System.out.println System.out System System.out fee String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        //sc.nextLine();
        //sc.close();
        String[] n  = str.split(" ");
        int a = Integer.parseInt(n[0]);
        int b = Integer.parseInt(n[1]);
        int fee = 0;
        if( a <= 5 ){
            fee = 0;
        } else if ( a >= 6 && a <= 12){
            fee = b / 2;
        } else {
            fee = b;
        }
        System.out.println(fee);
    } 
}  