#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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

ans = 0

if (a >= 13):
    ans = b
elif(a >= 6 and a <= 12):
    ans = b // 2
else:
    pass
print(ans)
 a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b ans = 0 ans 0 if (a >= 13):
    ans = b
elif(a >= 6 and a <= 12):
    ans = b // 2
else:
    pass a >= 13 a 13 ans = b ans b elif(a >= 6 and a <= 12):
    ans = b // 2 a >= 6 and a <= 12 a >= 6 a 6 a <= 12 a 12 ans = b // 2 ans b // 2 b 2 print(ans) print ans ans = b // 2 b // 2 ans b = map(int, input().split()) map(int, input().split()) b ans = b b ans ans = 0 0 ans a, b = map(int, input().split()) map(int, input().split()) a
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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

ans = 0

if (a >= 13):
    ans = b
elif(a >= 6 and a <= 12):
    ans = b // 2
else:
    pass
print(ans)

