import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader masae = new BufferedReader(new InputStreamReader(System.in));
	String masae2[] = masae.readLine().split(" ");
	int A = Integer.parseInt(masae2[0]);
	int B = Integer.parseInt(masae2[1]);
	if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	}
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader masae = new BufferedReader(new InputStreamReader(System.in));
	String masae2[] = masae.readLine().split(" ");
	int A = Integer.parseInt(masae2[0]);
	int B = Integer.parseInt(masae2[1]);
	if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	}
    }
} Main public static void main(String args[]) throws IOException {
	BufferedReader masae = new BufferedReader(new InputStreamReader(System.in));
	String masae2[] = masae.readLine().split(" ");
	int A = Integer.parseInt(masae2[0]);
	int B = Integer.parseInt(masae2[1]);
	if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	}
    } main {
	BufferedReader masae = new BufferedReader(new InputStreamReader(System.in));
	String masae2[] = masae.readLine().split(" ");
	int A = Integer.parseInt(masae2[0]);
	int B = Integer.parseInt(masae2[1]);
	if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	}
    } BufferedReader masae = new BufferedReader(new InputStreamReader(System.in)); masae new BufferedReader(new InputStreamReader(System.in)) String masae2[] = masae.readLine().split(" "); masae2 masae.readLine().split(" ") masae.readLine().split masae.readLine() masae.readLine masae " " int A = Integer.parseInt(masae2[0]); A Integer.parseInt(masae2[0]) Integer.parseInt Integer masae2[0] masae2 0 int B = Integer.parseInt(masae2[1]); B Integer.parseInt(masae2[1]) Integer.parseInt Integer masae2[1] masae2 1 if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	} A >= 13 A 13 {
	    System.out.println(B);
	} System.out.println(B) System.out.println System.out System System.out B if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	} A >= 6 && A <= 12 A >= 6 A 6 A <= 12 A 12 {
	    System.out.println(B / 2);
	} System.out.println(B / 2) System.out.println System.out System System.out B / 2 B 2 if (A <= 5) {
	    System.out.println(0);
	} A <= 5 A 5 {
	    System.out.println(0);
	} System.out.println(0) System.out.println System.out System System.out 0 String args[] args public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader masae = new BufferedReader(new InputStreamReader(System.in));
	String masae2[] = masae.readLine().split(" ");
	int A = Integer.parseInt(masae2[0]);
	int B = Integer.parseInt(masae2[1]);
	if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	}
    }
} public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader masae = new BufferedReader(new InputStreamReader(System.in));
	String masae2[] = masae.readLine().split(" ");
	int A = Integer.parseInt(masae2[0]);
	int B = Integer.parseInt(masae2[1]);
	if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	}
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws IOException {
	BufferedReader masae = new BufferedReader(new InputStreamReader(System.in));
	String masae2[] = masae.readLine().split(" ");
	int A = Integer.parseInt(masae2[0]);
	int B = Integer.parseInt(masae2[1]);
	if (A >= 13) {
	    System.out.println(B);
	} else if (A >= 6 && A <= 12) {
	    System.out.println(B / 2);
	} else if (A <= 5) {
	    System.out.println(0);
	}
    }
}