import sys
input = lambda : sys.stdin.readline().rstrip()

a, b = map(int, input().split())

ans = 0 if a <= 5 else b//2 if a <= 12 else b

print(ans) import sys sys input = lambda : sys.stdin.readline().rstrip() input 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 a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b ans = 0 if a <= 5 else b//2 if a <= 12 else b ans 0 if a <= 5 else b//2 if a <= 12 else b a <= 5 a 5 0 b//2 if a <= 12 else b a <= 12 a 12 b//2 b 2 b print(ans) print ans a, b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b input = lambda : sys.stdin.readline().rstrip() lambda : sys.stdin.readline().rstrip() input ans = 0 if a <= 5 else b//2 if a <= 12 else b 0 if a <= 5 else b//2 if a <= 12 else b ans
import sys
input = lambda : sys.stdin.readline().rstrip()

a, b = map(int, input().split())

ans = 0 if a <= 5 else b//2 if a <= 12 else b

print(ans)