n=input().split()
A=int(n[0])
B=int(n[1])

if 13<=A:
    print(B)
elif 6<=A<=12:
    print(int(B/2))
elif A<=5:
    print("0") n=input().split() n input().split() ().split () input split A=int(n[0]) A int(n[0]) int n[0] n 0 B=int(n[1]) B int(n[1]) int n[1] n 1 if 13<=A:
    print(B)
elif 6<=A<=12:
    print(int(B/2))
elif A<=5:
    print("0") 13<=A 13 A print(B) print B elif 6<=A<=12:
    print(int(B/2)) 6<=A<=12 6<=A 6 A 12 print(int(B/2)) print int(B/2) int B/2 B 2 elif A<=5:
    print("0") A<=5 A 5 print("0") print "0" A=int(n[0]) int(n[0]) A n=input().split() input().split() n B=int(n[1]) int(n[1]) B
n=input().split()
A=int(n[0])
B=int(n[1])

if 13<=A:
    print(B)
elif 6<=A<=12:
    print(int(B/2))
elif A<=5:
    print("0")