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

cost = 0

if age >= 13:
    cost = yen
elif age >= 6 and age <= 12:
    cost = yen/2

elif age <= 5:
    cost = 0

print(int(cost)) age,yen = map(int,input().split()) age map(int,input().split()) map int input().split() ().split () input split yen cost = 0 cost 0 if age >= 13:
    cost = yen
elif age >= 6 and age <= 12:
    cost = yen/2

elif age <= 5:
    cost = 0 age >= 13 age 13 cost = yen cost yen elif age >= 6 and age <= 12:
    cost = yen/2 age >= 6 and age <= 12 age >= 6 age 6 age <= 12 age 12 cost = yen/2 cost yen/2 yen 2 elif age <= 5:
    cost = 0 age <= 5 age 5 cost = 0 cost 0 print(int(cost)) print int(cost) int cost cost = 0 0 cost cost = yen yen cost cost = yen/2 yen/2 cost yen = map(int,input().split()) map(int,input().split()) yen cost = 0 0 cost age,yen = map(int,input().split()) map(int,input().split()) age
age,yen = map(int,input().split())

cost = 0

if age >= 13:
    cost = yen
elif age >= 6 and age <= 12:
    cost = yen/2

elif age <= 5:
    cost = 0

print(int(cost))