import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC127_a solver = new ABC127_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC127_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC127_a solver = new ABC127_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC127_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC127_a solver = new ABC127_a();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC127_a solver = new ABC127_a();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) ABC127_a solver = new ABC127_a(); solver new ABC127_a() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC127_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        }

    } ABC127_a public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        } solve {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        } int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in if (A <= 5) {
                out.println(0);
                return;
            } A <= 5 A 5 {
                out.println(0);
                return;
            } out.println(0) out.println out 0 return; if (A >= 13) {
                out.println(B);
                return;
            } A >= 13 A 13 {
                out.println(B);
                return;
            } out.println(B) out.println out B return; if (A <= 12) {
                out.print(B / 2);
                return;
            } A <= 12 A 12 {
                out.print(B / 2);
                return;
            } out.print(B / 2) out.print out B / 2 B 2 return; int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC127_a solver = new ABC127_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC127_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC127_a solver = new ABC127_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC127_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC127_a solver = new ABC127_a();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC127_a {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int A = in.nextInt();
            int B = in.nextInt();

            if (A <= 5) {
                out.println(0);
                return;
            }
            if (A >= 13) {
                out.println(B);
                return;
            }
            if (A <= 12) {
                out.print(B / 2);
                return;
            }
        }

    }
}

