try:
    age,money=map(int, input().split())
    assert 0<=age<=100 and 2<=money<=1000 and money%2==0
    if age<=5:
        print('0')
    elif 6<=age<=12:
        print(money//2)
    else:
        print(money)
except AssertionError:
    print('')
 try:
    age,money=map(int, input().split())
    assert 0<=age<=100 and 2<=money<=1000 and money%2==0
    if age<=5:
        print('0')
    elif 6<=age<=12:
        print(money//2)
    else:
        print(money)
except AssertionError:
    print('') except AssertionError:
    print('') print('') print '' age,money=map(int, input().split()) age map(int, input().split()) map int input().split() ().split () input split money assert 0<=age<=100 and 2<=money<=1000 and money%2==0 0<=age<=100 and 2<=money<=1000 and money%2==0 0<=age<=100 and 2<=money<=1000 0<=age<=100 0<=age 0 age 100 2<=money<=1000 2<=money 2 money 1000 money%2==0 money%2 money 2 0 if age<=5:
        print('0')
    elif 6<=age<=12:
        print(money//2)
    else:
        print(money) age<=5 age 5 print('0') print '0' elif 6<=age<=12:
        print(money//2)
     6<=age<=12 6<=age 6 age 12 print(money//2) print money//2 money 2 print(money) print money money=map(int, input().split()) map(int, input().split()) money age,money=map(int, input().split()) map(int, input().split()) age
try:
    age,money=map(int, input().split())
    assert 0<=age<=100 and 2<=money<=1000 and money%2==0
    if age<=5:
        print('0')
    elif 6<=age<=12:
        print(money//2)
    else:
        print(money)
except AssertionError:
    print('')

