import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

a, b = map(int, input().split())
if a >= 13:
    print(b)
elif a >= 6:
    print(b//2)
else:
    print(0) import sys sys from math import ceil, floor, sqrt, sin, cos, pi from itertools import accumulate, permutations, combinations from fractions import gcd from collections import deque, Counter from operator import itemgetter from heapq import heappop,heappush sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split())) lcm x x y y a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b if a >= 13:
    print(b)
elif a >= 6:
    print(b//2)
else:
    print(0) a >= 13 a 13 print(b) print b elif a >= 6:
    print(b//2) a >= 6 a 6 print(b//2) print b//2 b 2 print(0) print 0 a, b = map(int, input().split()) map(int, input().split()) a def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split())) def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split())) lcm b = map(int, input().split()) map(int, input().split()) b
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

a, b = map(int, input().split())
if a >= 13:
    print(b)
elif a >= 6:
    print(b//2)
else:
    print(0)
