import java.util.*;
import java.io.*;
import static java.lang.System.*;

public class Main{
	public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2);
	}
} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main{
	public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2);
	}
} Main public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2);
	} main {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2);
	} int a a b; b Scanner sc = new Scanner(System.in); sc new Scanner(System.in) a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2); a <= 5 a 5 out.println(0) out.println out 0 if(a >= 13)	out.println(b);
		else	out.println(b / 2); a >= 13 a 13 out.println(b) out.println out b out.println(b / 2) out.println out b / 2 b 2 String[] args args public class Main{
	public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2);
	}
} public class Main{
	public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2);
	}
} Main
import java.util.*;
import java.io.*;
import static java.lang.System.*;

public class Main{
	public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a = sc.nextInt();
		b = sc.nextInt();
		if(a <= 5)	out.println(0);
		else if(a >= 13)	out.println(b);
		else	out.println(b / 2);
	}
}
