import java.util.Scanner;
public class Main {
public static void main(String []args) {
	Scanner tc = new Scanner (System.in);
	int a,b;
	a = tc.nextInt();
	b = tc.nextInt();
	
	if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	}
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String []args) {
	Scanner tc = new Scanner (System.in);
	int a,b;
	a = tc.nextInt();
	b = tc.nextInt();
	
	if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	}
}
} Main public static void main(String []args) {
	Scanner tc = new Scanner (System.in);
	int a,b;
	a = tc.nextInt();
	b = tc.nextInt();
	
	if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	}
} main {
	Scanner tc = new Scanner (System.in);
	int a,b;
	a = tc.nextInt();
	b = tc.nextInt();
	
	if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	}
} Scanner tc = new Scanner (System.in); tc new Scanner (System.in) int a a b; b a = tc.nextInt() a tc.nextInt() tc.nextInt tc b = tc.nextInt() b tc.nextInt() tc.nextInt tc if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	} b%2==0 b%2 b 2 0 {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	} if(a<=5) {
	System.out.println(b*0);
			
		} a<=5 a 5 {
	System.out.println(b*0);
			
		} System.out.println(b*0) System.out.println System.out System System.out b*0 b 0 if(a>=6 && a<=12) {
	System.out.println(b/2);
	
} 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>=13) {
			System.out.println(b);
		} a>=13 a 13 {
			System.out.println(b);
		} System.out.println(b) System.out.println System.out System System.out b String []args args public class Main {
public static void main(String []args) {
	Scanner tc = new Scanner (System.in);
	int a,b;
	a = tc.nextInt();
	b = tc.nextInt();
	
	if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	}
}
} public class Main {
public static void main(String []args) {
	Scanner tc = new Scanner (System.in);
	int a,b;
	a = tc.nextInt();
	b = tc.nextInt();
	
	if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	}
}
} Main
import java.util.Scanner;
public class Main {
public static void main(String []args) {
	Scanner tc = new Scanner (System.in);
	int a,b;
	a = tc.nextInt();
	b = tc.nextInt();
	
	if(b%2==0) {
if(a<=5) {
	System.out.println(b*0);
			
		}
if(a>=6 && a<=12) {
	System.out.println(b/2);
	
}
		if(a>=13) {
			System.out.println(b);
		}
		
	}
}
}