import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		// 年齢
		int A = sc.nextInt();

		// 通常の値段
		int B = sc.nextInt();

		// 年齢が0～5歳の場合0円
		if (0 <= A && A <= 5) {
			System.out.print(0);
			// 6～12歳の場合半額
		} else if (6 <= A && A <= 12) {
			System.out.print(B / 2);
			// 13歳以上は通常
		} else if (13 <= A) {
			System.out.print(B);
		}
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz