rStr = input()

A = int(rStr.split(' ')[0])
B = int(rStr.split(' ')[1])

result = 0

if 13 <= A :
    result = B

elif A <= 5 :
    result = 0

else :
    result = int(B / 2)

print(result) rStr = input() rStr input() input A = int(rStr.split(' ')[0]) A int(rStr.split(' ')[0]) int rStr.split(' ')[0] rStr.split(' ') rStr.split rStr split ' ' 0 B = int(rStr.split(' ')[1]) B int(rStr.split(' ')[1]) int rStr.split(' ')[1] rStr.split(' ') rStr.split rStr split ' ' 1 result = 0 result 0 if 13 <= A :
    result = B

elif A <= 5 :
    result = 0

else :
    result = int(B / 2) 13 <= A 13 A result = B result B elif A <= 5 :
    result = 0 A <= 5 A 5 result = 0 result 0 result = int(B / 2) result int(B / 2) int B / 2 B 2 print(result) print result A = int(rStr.split(' ')[0]) int(rStr.split(' ')[0]) A result = 0 0 result result = 0 0 result B = int(rStr.split(' ')[1]) int(rStr.split(' ')[1]) B rStr = input() input() rStr result = B B result result = int(B / 2) int(B / 2) result
rStr = input()

A = int(rStr.split(' ')[0])
B = int(rStr.split(' ')[1])

result = 0

if 13 <= A :
    result = B

elif A <= 5 :
    result = 0

else :
    result = int(B / 2)

print(result)