import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
a, b = map(int, input().split())
#s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

if a <= 5:
    print(0)
elif a >= 13:
    print(b)
else:
    print(b//2) import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b if a <= 5:
    print(0)
elif a >= 13:
    print(b)
else:
    print(b//2) a <= 5 a 5 print(0) print 0 elif a >= 13:
    print(b) a >= 13 a 13 print(b) print b print(b//2) print b//2 b 2 b = map(int, input().split()) map(int, input().split()) b a, b = map(int, input().split()) map(int, input().split()) a
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
a, b = map(int, input().split())
#s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

if a <= 5:
    print(0)
elif a >= 13:
    print(b)
else:
    print(b//2)