# 初期入力
import sys
input = sys.stdin.readline
A,B = (int(i) for i in input().split())
if 13 <= A:
    ans =B
elif 6 <= A <=12:
    ans =B//2
elif A <=5:
    ans =0

print(ans) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A,B = (int(i) for i in input().split()) A (int(i) for i in input().split()) B if 13 <= A:
    ans =B
elif 6 <= A <=12:
    ans =B//2
elif A <=5:
    ans =0 13 <= A 13 A ans =B ans B elif 6 <= A <=12:
    ans =B//2 6 <= A <=12 6 <= A 6 A 12 ans =B//2 ans B//2 B 2 elif A <=5:
    ans =0 A <=5 A 5 ans =0 ans 0 print(ans) print ans ans =B//2 B//2 ans A,B = (int(i) for i in input().split()) (int(i) for i in input().split()) A ans =0 0 ans ans =B B ans input = sys.stdin.readline sys.stdin.readline input B = (int(i) for i in input().split()) (int(i) for i in input().split()) B
# 初期入力
import sys
input = sys.stdin.readline
A,B = (int(i) for i in input().split())
if 13 <= A:
    ans =B
elif 6 <= A <=12:
    ans =B//2
elif A <=5:
    ans =0

print(ans)