import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int a = Integer.parseInt(params[0]);
        int b = Integer.parseInt(params[1]);

        System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b );

    }

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

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int a = Integer.parseInt(params[0]);
        int b = Integer.parseInt(params[1]);

        System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b );

    }

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

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int a = Integer.parseInt(params[0]);
        int b = Integer.parseInt(params[1]);

        System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b );

    } main {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int a = Integer.parseInt(params[0]);
        int b = Integer.parseInt(params[1]);

        System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b );

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String[] params = in.nextLine().split(" "); params in.nextLine().split(" ") in.nextLine().split in.nextLine() in.nextLine in " " int a = Integer.parseInt(params[0]); a Integer.parseInt(params[0]) Integer.parseInt Integer params[0] params 0 int b = Integer.parseInt(params[1]); b Integer.parseInt(params[1]) Integer.parseInt Integer params[1] params 1 System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b ) System.out.println System.out System System.out a <= 5 ? 0 : a <= 12 ? b / 2 : b a <= 5 a 5 0 a <= 12 ? b / 2 : b a <= 12 a 12 b / 2 b 2 b String[] args args public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int a = Integer.parseInt(params[0]);
        int b = Integer.parseInt(params[1]);

        System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b );

    }

} public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int a = Integer.parseInt(params[0]);
        int b = Integer.parseInt(params[1]);

        System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b );

    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        String[] params = in.nextLine().split(" ");
        int a = Integer.parseInt(params[0]);
        int b = Integer.parseInt(params[1]);

        System.out.println( a <= 5 ? 0 : a <= 12 ? b / 2 : b );

    }

}
