a,b = map(int,input().split())
if 13 <= a:
    ans = b
elif 6 <= a and a <=12:
    ans = b//2
elif a <= 5:
    ans = 0
print(ans) a,b = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b if 13 <= a:
    ans = b
elif 6 <= a and a <=12:
    ans = b//2
elif a <= 5:
    ans = 0 13 <= a 13 a ans = b ans b elif 6 <= a and a <=12:
    ans = b//2 6 <= a and a <=12 6 <= a 6 a a <=12 a 12 ans = b//2 ans b//2 b 2 elif a <= 5:
    ans = 0 a <= 5 a 5 ans = 0 ans 0 print(ans) print ans ans = 0 0 ans ans = b b ans ans = b//2 b//2 ans b = map(int,input().split()) map(int,input().split()) b a,b = map(int,input().split()) map(int,input().split()) a
a,b = map(int,input().split())
if 13 <= a:
    ans = b
elif 6 <= a and a <=12:
    ans = b//2
elif a <= 5:
    ans = 0
print(ans)