import sys

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


a, b = nm()
if a >= 13:
    print(b)
elif 6 <= a <= 12:
    print(b // 2)
else:
    print(0) import sys sys stdin = sys.stdin stdin sys.stdin sys stdin def ns(): return stdin.readline().rstrip() ns def ni(): return int(stdin.readline().rstrip()) ni def nm(): return map(int, stdin.readline().split()) nm def nl(): return list(map(int, stdin.readline().split())) nl a, b = nm() a nm() nm b if a >= 13:
    print(b)
elif 6 <= a <= 12:
    print(b // 2)
else:
    print(0) a >= 13 a 13 print(b) print b elif 6 <= a <= 12:
    print(b // 2) 6 <= a <= 12 6 <= a 6 a 12 print(b // 2) print b // 2 b 2 print(0) print 0 stdin = sys.stdin sys.stdin stdin def nm(): return map(int, stdin.readline().split()) def nm(): return map(int, stdin.readline().split()) nm def nl(): return list(map(int, stdin.readline().split())) def nl(): return list(map(int, stdin.readline().split())) nl a, b = nm() nm() a b = nm() nm() b def ni(): return int(stdin.readline().rstrip()) def ni(): return int(stdin.readline().rstrip()) ni def ns(): return stdin.readline().rstrip() def ns(): return stdin.readline().rstrip() ns
import sys

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


a, b = nm()
if a >= 13:
    print(b)
elif 6 <= a <= 12:
    print(b // 2)
else:
    print(0)
