import java.util.*;
import java.io.*;

class Main {

	void solve () {

		int a = in.nextInt(), b = in.nextInt();
		int ans = 0;
		
		if (a >= 13) ans = b;
		else if (a >= 6 && a <= 12) ans = b/2;
		else ans = 0;
		
		out.println(ans);
		
		
	}

	public static PrintWriter out = new PrintWriter(System.out);
	public static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

} import java.util.*; util.* java import java.io.*; io.* java class Main {

	void solve () {

		int a = in.nextInt(), b = in.nextInt();
		int ans = 0;
		
		if (a >= 13) ans = b;
		else if (a >= 6 && a <= 12) ans = b/2;
		else ans = 0;
		
		out.println(ans);
		
		
	}

	public static PrintWriter out = new PrintWriter(System.out);
	public static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

} Main public static PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static Scanner in = new Scanner(System.in); in new Scanner(System.in) void solve () {

		int a = in.nextInt(), b = in.nextInt();
		int ans = 0;
		
		if (a >= 13) ans = b;
		else if (a >= 6 && a <= 12) ans = b/2;
		else ans = 0;
		
		out.println(ans);
		
		
	} solve {

		int a = in.nextInt(), b = in.nextInt();
		int ans = 0;
		
		if (a >= 13) ans = b;
		else if (a >= 6 && a <= 12) ans = b/2;
		else ans = 0;
		
		out.println(ans);
		
		
	} int a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt(); b in.nextInt() in.nextInt in int ans = 0; ans 0 if (a >= 13) ans = b;
		else if (a >= 6 && a <= 12) ans = b/2;
		else ans = 0; a >= 13 a 13 ans = b ans b if (a >= 6 && a <= 12) ans = b/2;
		else ans = 0; a >= 6 && a <= 12 a >= 6 a 6 a <= 12 a 12 ans = b/2 ans b/2 b 2 ans = 0 ans 0 out.println(ans) out.println out ans public static void main(String[] args) {
		new Main().solve();
		out.flush();
	} main {
		new Main().solve();
		out.flush();
	} new Main().solve() new Main().solve new Main() out.flush() out.flush out String[] args args
import java.util.*;
import java.io.*;

class Main {

	void solve () {

		int a = in.nextInt(), b = in.nextInt();
		int ans = 0;
		
		if (a >= 13) ans = b;
		else if (a >= 6 && a <= 12) ans = b/2;
		else ans = 0;
		
		out.println(ans);
		
		
	}

	public static PrintWriter out = new PrintWriter(System.out);
	public static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

}