# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
answer = B if A >= 13 else B // 2 if A >= 6 else 0
print(answer)
# 40 import sys sys sr = lambda: sys.stdin.readline().rstrip() sr lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip ir = lambda: int(sr()) ir lambda: int(sr()) int(sr()) int sr() sr lr = lambda: list(map(int, sr().split())) lr lambda: list(map(int, sr().split())) list(map(int, sr().split())) list map(int, sr().split()) map int sr().split() ().split () sr split A, B = lr() A lr() lr B answer = B if A >= 13 else B // 2 if A >= 6 else 0 answer B if A >= 13 else B // 2 if A >= 6 else 0 A >= 13 A 13 B B // 2 if A >= 6 else 0 A >= 6 A 6 B // 2 B 2 0 print(answer) print answer lr = lambda: list(map(int, sr().split())) lambda: list(map(int, sr().split())) lr B = lr() lr() B ir = lambda: int(sr()) lambda: int(sr()) ir sr = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() sr A, B = lr() lr() A answer = B if A >= 13 else B // 2 if A >= 6 else 0 B if A >= 13 else B // 2 if A >= 6 else 0 answer
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
answer = B if A >= 13 else B // 2 if A >= 6 else 0
print(answer)
# 40