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

if age >= 13:
    ans = price
elif age >= 6:
    ans = price//2
else:
    ans = 0

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

if age >= 13:
    ans = price
elif age >= 6:
    ans = price//2
else:
    ans = 0

print(ans)