import java.util.*;

public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        scanner.close();

        // check
        int count = 0;

        if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        }


        System.out.println(count);

//        System.out.println(System.currentTimeMillis() - startTime);
    }


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

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        scanner.close();

        // check
        int count = 0;

        if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        }


        System.out.println(count);

//        System.out.println(System.currentTimeMillis() - startTime);
    }


} Main public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        scanner.close();

        // check
        int count = 0;

        if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        }


        System.out.println(count);

//        System.out.println(System.currentTimeMillis() - startTime);
    } main {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        scanner.close();

        // check
        int count = 0;

        if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        }


        System.out.println(count);

//        System.out.println(System.currentTimeMillis() - startTime);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A = scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B = scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner int count = 0; count 0 if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        } A >= 6 && A <= 12 A >= 6 A 6 A <= 12 A 12 {
            count = B / 2;
        } count = B / 2 count B / 2 B 2 if (A <= 5) {
            count = 0;
        } else {
            count = B;
        } A <= 5 A 5 {
            count = 0;
        } count = 0 count 0 {
            count = B;
        } count = B count B System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        scanner.close();

        // check
        int count = 0;

        if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        }


        System.out.println(count);

//        System.out.println(System.currentTimeMillis() - startTime);
    }


} public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        scanner.close();

        // check
        int count = 0;

        if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        }


        System.out.println(count);

//        System.out.println(System.currentTimeMillis() - startTime);
    }


} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        scanner.close();

        // check
        int count = 0;

        if (A >= 6 && A <= 12) {
            count = B / 2;
        } else if (A <= 5) {
            count = 0;
        } else {
            count = B;
        }


        System.out.println(count);

//        System.out.println(System.currentTimeMillis() - startTime);
    }


}
