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

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

if 13 <= age:
    print(fee)
elif 6 <= age  and age <= 12:
    print(fee // 2)
elif age < 6:
    print(0)