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


if a<=5:
    fee = 0
elif a>=13:
    fee = b
else:
    fee = b//2

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


if a<=5:
    fee = 0
elif a>=13:
    fee = b
else:
    fee = b//2

print(fee)