import java.io.*;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		try {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = new String(in.readLine());
		String[] input = line.split(" ", 0);
		int age = Integer.parseInt(input[0].trim());
		int price = Integer.parseInt(input[1].trim());
		//System.out.println("入力値は、" + age + "と" + price);
		
			if(age <= 5) {
				System.out.print("0");
			}else if(age <= 12) {
				System.out.print(price / 2);
			}else {
				System.out.print(price);
			}
		} catch (IOException e) {
			System.out.print(e);
		}
	}

}

/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