import java.util.*;
import java.lang.*;

public class Main {

    static long gcd(long a, long b){
        if(a<b) return gcd(b,a);
        if(b==0) return a;
        if(a%b==0) return b;
        return gcd(b,a%b);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        int cost = sc.nextInt();

        int takCost;
        if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost;

        System.out.println(takCost);

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

    static long gcd(long a, long b){
        if(a<b) return gcd(b,a);
        if(b==0) return a;
        if(a%b==0) return b;
        return gcd(b,a%b);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        int cost = sc.nextInt();

        int takCost;
        if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost;

        System.out.println(takCost);

    }
} Main static long gcd(long a, long b){
        if(a<b) return gcd(b,a);
        if(b==0) return a;
        if(a%b==0) return b;
        return gcd(b,a%b);
    } gcd {
        if(a<b) return gcd(b,a);
        if(b==0) return a;
        if(a%b==0) return b;
        return gcd(b,a%b);
    } if(a<b) return gcd(b,a); a<b a b return gcd(b,a); gcd(b,a) gcd b a if(b==0) return a; b==0 b 0 return a; a if(a%b==0) return b; a%b==0 a%b a b 0 return b; b return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b long a a long b b public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        int cost = sc.nextInt();

        int takCost;
        if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost;

        System.out.println(takCost);

    } main {
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        int cost = sc.nextInt();

        int takCost;
        if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost;

        System.out.println(takCost);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int age = sc.nextInt(); age sc.nextInt() sc.nextInt sc int cost = sc.nextInt(); cost sc.nextInt() sc.nextInt sc int takCost; takCost if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost; age<=5 age 5 takCost=0 takCost 0 if(age<=12) takCost = cost/2;
        else takCost = cost; age<=12 age 12 takCost = cost/2 takCost cost/2 cost 2 takCost = cost takCost cost System.out.println(takCost) System.out.println System.out System System.out takCost String[] args args public class Main {

    static long gcd(long a, long b){
        if(a<b) return gcd(b,a);
        if(b==0) return a;
        if(a%b==0) return b;
        return gcd(b,a%b);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        int cost = sc.nextInt();

        int takCost;
        if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost;

        System.out.println(takCost);

    }
} public class Main {

    static long gcd(long a, long b){
        if(a<b) return gcd(b,a);
        if(b==0) return a;
        if(a%b==0) return b;
        return gcd(b,a%b);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        int cost = sc.nextInt();

        int takCost;
        if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost;

        System.out.println(takCost);

    }
} Main
import java.util.*;
import java.lang.*;

public class Main {

    static long gcd(long a, long b){
        if(a<b) return gcd(b,a);
        if(b==0) return a;
        if(a%b==0) return b;
        return gcd(b,a%b);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int age = sc.nextInt();
        int cost = sc.nextInt();

        int takCost;
        if(age<=5) takCost=0;
        else if(age<=12) takCost = cost/2;
        else takCost = cost;

        System.out.println(takCost);

    }
}