Problem:
Score : 100 points

Problem Statement

Takahashi, who is A years old, is riding a Ferris wheel.

It costs B yen (B is an even number) to ride the Ferris wheel if you are 13 years old or older, but children between 6 and 12 years old (inclusive) can ride it for half the cost, and children who are 5 years old or younger are free of charge. (Yen is the currency of Japan.)

Find the cost of the Ferris wheel for Takahashi.

Constraints

0 ≤ A ≤ 100

2 ≤ B ≤ 1000

B is an even number.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the cost of the Ferris wheel for Takahashi.

Sample Input 1

30 100

Sample Output 1

100

Takahashi is 30 years old now, and the cost of the Ferris wheel is 100 yen.

Sample Input 2

12 100

Sample Output 2

50

Takahashi is 12 years old, and the cost of the Ferris wheel is the half of 100 yen, that is, 50 yen.

Sample Input 3

0 100

Sample Output 3

0

Takahashi is 0 years old, and he can ride the Ferris wheel for free.

Solution in C++ (GCC 9.2.1) (judge verdict: Accepted)

#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<iomanip>
#include<functional>
#include<cstdlib>
#include<queue>
#include<deque>
const double PI = acos(-1);
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
using ll =long long;
const int mod = 1000000007;
class mint {
	long long x;
public:
	mint(long long x = 0) : x((x% mod + mod) % mod) {}
	mint operator-() const {
		return mint(-x);
	}
	mint& operator+=(const mint & a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint & operator-=(const mint & a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint & operator*=(const  mint & a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint & a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint & a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint & a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}
	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint & a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint & a) const {
		mint res(*this);
		return res /= a;
	}

	friend ostream& operator<<(ostream & os, const mint & m) {
		os << m.x;
		return os;
	}
};
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

ll gcd(ll a, ll b) {
	if (a % b == 0) {
		return b;
	}
	else {
		return gcd(b, a % b);
	}
}
ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
};
//fixed << setprecision(2)
void func(vector<vector<int>>a, int x, int y, int h, int w, vector<vector<char>>c, int* ans) {

	if (x + 1 < w && a[y][x + 1] == 0 && c[y][x + 1] == 'g') {
		*ans = 1;
	}
	if (x > 0 && a[y][x - 1] == 0 && c[y][x - 1] == 'g') {
		*ans = 1;
	}
	if (y + 1 < h && a[y + 1][x] == 0 && c[y + 1][x] == 'g') {
		*ans = 1;
	}
	if (y > 0 && a[y - 1][x] == 0 && c[y - 1][x] == 'g') {
		*ans = 1;
	}




	if (x + 1 < w && a[y][x + 1] == 0 && c[y][x+1] == '.') {
		a[y][x + 1] = 1;
		func(a,x+1,y,h,w,c,ans);
	}
	if (x > 0 && a[y][x - 1] == 0 && c[y][x - 1] == '.') {
		a[y][x - 1] = 1;
		func(a, x - 1, y, h, w,c,ans);
	}
	if (y + 1 < h && a[y+1][x] == 0 && c[y+1][x] == '.') {
		a[y+1][x] = 1;
		func(a, x, y+1, h, w,c,ans);
	}
	if (y > 0 && a[y-1][x] == 0 && c[y-1][x] == '.') {
		a[y-1][x] = 1;
		func(a, x, y-1, h, w,c,ans);
	}

	
	a[x][y] = 2;
	if (x + 1 < w && a[y][x + 1] == 1 && c[y][x + 1] == '.') {
		a[y][x + 1] = 2;
		func(a, x + 1, y, h, w, c,ans);
	}
	if (x > 0 && a[y][x - 1] == 1 && c[y][x - 1] == '.') {
		a[y][x - 1] = 2;
		func(a, x - 1, y, h, w, c,ans);
	}
	if (y + 1 < h && a[y + 1][x] == 1 && c[y + 1][x] == '.') {
		a[y + 1][x] = 2;
		func(a, x, y + 1, h, w, c,ans);
	}
	if (y > 0 && a[y - 1][x] == 1 && c[y - 1][x] == '.') {
		a[y - 1][x] = 2;
		func(a, x, y - 1, h, w, c,ans);
	}
}
ll d(ll a) {
	ll ans = 1;
	a /= 10;
	while (a != 0) {
		ans++;
		a /= 10;
	}
	return ans;
}
bool f(ll tmp,ll a,ll b,ll x) {
	if (a * tmp + b * d(tmp)<=x) {
		return true;
	}
	else {
		return false;
	}
}
int main() {
	int a, b;
	cin >> a >> b;
	if (a <= 5) {
		cout << 0;
		return 0;
	}
	else if (a <= 12) {
		cout << b / 2;
		return 0;
	}
	else {
		cout << b;
		return 0;
	}
	/*ll a, b;
	ll x;
	cin >> a >> b >> x;
	ll right = pow(10, 9);
	ll left = 0;
	if (f(pow(10, 9), a, b, x)) {
		cout <<fixed()<<pow(10, 9);
		return 0;
	}
	ll tmp;
	while (right-1!=left) {
		tmp = (right + left) / 2;
			 if (f(tmp, a, b, x)) {
				 left = tmp;
			 }
			 else {
				 right = tmp;
			 }
	}
	cout <<left;*/
	/*int h, w;
	cin >> h >> w;
	int v0x, v0y;
	int ans = 0;
	vector<vector<int>>a(h, vector<int>(w));

	vector<vector<char>>c(h, vector<char>(w));
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			a[i][j] = 0;
			cin >> c[i][j];
			if (c[i][j] == 's') {
				v0y = i;
				v0x = j;
			}
		}
	}

	func(a, v0x, v0y, h, w, c, &ans);
	if (ans == 1) {
		cout << "yes";
	}
	else {
		cout << "no";
	}*/
}