#入力:N,M(int:整数)
def input2():
	return map(int,input().split())
  
a,b=input2()

if a>=13:
	print(b)
elif a>=6 and a<=12:
	print(b//2)
else:
	print(0) def input2():
	return map(int,input().split())
   input2 return map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split a,b=input2() a input2() input2 b if a>=13:
	print(b)
elif a>=6 and a<=12:
	print(b//2)
else:
	print(0) a>=13 a 13 print(b) print b elif a>=6 and a<=12:
	print(b//2) a>=6 and a<=12 a>=6 a 6 a<=12 a 12 print(b//2) print b//2 b 2 print(0) print 0 def input2():
	return map(int,input().split())
   def input2():
	return map(int,input().split())
   input2 b=input2() input2() b a,b=input2() input2() a
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())
  
a,b=input2()

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