import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		}

	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		}

	} main {
		// TODO Auto-generated method stub
		
		try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		}

	} try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		} catch (Exception e) {
			// TODO: handle exception
		} Exception e {
			// TODO: handle exception
		} {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int AGE AGE PRICE PRICE ans; ans AGE = sc.nextInt() AGE sc.nextInt() sc.nextInt sc PRICE = sc.nextInt() PRICE sc.nextInt() sc.nextInt sc if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			} AGE < 6 AGE 6 {
				ans = 0;
			} ans = 0 ans 0 if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			} AGE < 13 AGE 13 {
				ans = PRICE/2;
			} ans = PRICE/2 ans PRICE/2 PRICE 2 {
				ans = PRICE;
			} ans = PRICE ans PRICE System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		}

	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		try (Scanner sc = new Scanner(System.in)) {
			int AGE, PRICE, ans;
			AGE = sc.nextInt();
			PRICE = sc.nextInt();
			
			if (AGE < 6) {
				ans = 0;
			} else if (AGE < 13) {
				ans = PRICE/2;
			} else {
				ans = PRICE;
			}
			
			System.out.println(ans);
			
		} catch (Exception e) {
			// TODO: handle exception
		}

	}

}
