line = input()
A,B = [int(n) for n in line.split()]
if A<= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B) line = input() line input() input int(n) for n in line.split() for n in line.split() n line.split() line.split line split for n in line.split() int(n) int n A,B = [int(n) for n in line.split()] A [int(n) for n in line.split()] B if A<= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B) A<= 5 A 5 print(0) print 0 elif A <= 12:
    print(B//2) A <= 12 A 12 print(B//2) print B//2 B 2 print(B) print B line = input() input() line A,B = [int(n) for n in line.split()] [int(n) for n in line.split()] A B = [int(n) for n in line.split()] [int(n) for n in line.split()] B
line = input()
A,B = [int(n) for n in line.split()]
if A<= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B)