A,B=map(int, raw_input().split())
if 13<=A:
    print B
elif 6<=A<=12:
    print B/2
elif A<=5:
    print 0 A,B=map(int, raw_input().split()) A map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split B if 13<=A:
    print B
elif 6<=A<=12:
    print B/2
elif A<=5:
    print 0 13<=A 13 A print elif 6<=A<=12:
    print B/2 6<=A<=12 6<=A 6 A 12 print B/2 B 2 elif A<=5:
    print 0 A<=5 A 5 print B=map(int, raw_input().split()) map(int, raw_input().split()) B A,B=map(int, raw_input().split()) map(int, raw_input().split()) A
A,B=map(int, raw_input().split())
if 13<=A:
    print B
elif 6<=A<=12:
    print B/2
elif A<=5:
    print 0