age, b = map(int, input().split())

if age >= 13:
	print(b)
elif 6 <= age < 13:
	print(b // 2)
else:
	print(0)   age, b = map(int, input().split()) age map(int, input().split()) map int input().split() ().split () input split b if age >= 13:
	print(b)
elif 6 <= age < 13:
	print(b // 2)
else:
	print(0)   age >= 13 age 13 print(b) print b elif 6 <= age < 13:
	print(b // 2) 6 <= age < 13 6 <= age 6 age 13 print(b // 2) print b // 2 b 2 print(0) print 0 b = map(int, input().split()) map(int, input().split()) b age, b = map(int, input().split()) map(int, input().split()) age
age, b = map(int, input().split())

if age >= 13:
	print(b)
elif 6 <= age < 13:
	print(b // 2)
else:
	print(0)  
