import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    A,B=mi()
    if A <= 5:
        print(0)
    elif 6<=A<=12:
        print(B//2)
    else:
        print(B)




if __name__ == "__main__":
    main() import sys sys sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 def mi(): return map(int,input().split()) mi def ii(): return int(input()) ii def isp(): return input().split() isp def deb(text): print("-------\n{}\n-------".format(text)) deb text text INF=10**20 INF 10**20 10 20 def main():
    A,B=mi()
    if A <= 5:
        print(0)
    elif 6<=A<=12:
        print(B//2)
    else:
        print(B) main A,B=mi() A mi() mi B if A <= 5:
        print(0)
    elif 6<=A<=12:
        print(B//2)
    else:
        print(B) A <= 5 A 5 print(0) print 0 elif 6<=A<=12:
        print(B//2)
     6<=A<=12 6<=A 6 A 12 print(B//2) print B//2 B 2 print(B) print B if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def isp(): return input().split() def isp(): return input().split() isp def mi(): return map(int,input().split()) def mi(): return map(int,input().split()) mi def main():
    A,B=mi()
    if A <= 5:
        print(0)
    elif 6<=A<=12:
        print(B//2)
    else:
        print(B) def main():
    A,B=mi()
    if A <= 5:
        print(0)
    elif 6<=A<=12:
        print(B//2)
    else:
        print(B) main INF=10**20 10**20 INF def deb(text): print("-------\n{}\n-------".format(text)) def deb(text): print("-------\n{}\n-------".format(text)) deb def ii(): return int(input()) def ii(): return int(input()) ii
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    A,B=mi()
    if A <= 5:
        print(0)
    elif 6<=A<=12:
        print(B//2)
    else:
        print(B)




if __name__ == "__main__":
    main()