import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

A,B = LI()

if A <= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B) import sys sys def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def S(): return sys.stdin.readline().rstrip() S def LS(): return list(sys.stdin.readline().rstrip().split()) LS A,B = LI() A LI() LI B if A <= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B) A <= 5 A 5 print(0) print 0 elif A <= 12:
    print(B//2) A <= 12 A 12 print(B//2) print B//2 B 2 print(B) print B def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI B = LI() LI() B def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S A,B = LI() LI() A
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

A,B = LI()

if A <= 5:
    print(0)
elif A <= 12:
    print(B//2)
else:
    print(B)