#ABC127A - Ferris Wheel

A, B = list(map(int,input().split()))

if A >= 13:

    print(B)

if 6 <= A <= 12:

    print((B//2))

if A <= 5:

    print((0))
#ABC127A - Ferris Wheel

A, B = list(map(int,input().split()))

if A >= 13:

    print(B)

elif 6 <= A <= 12:

    print((B//2))

else:

    print((0))
# ABC127A - Ferris Wheel
A, B = list(map(int, input().split()))
if A >= 13:
    print(B)
if 6 <= A <= 12:
    print((B // 2))
if A <= 5:
    print((0))

# ABC127A - Ferris Wheel
A, B = list(map(int, input().split()))
if A >= 13:
    print(B)
elif 6 <= A <= 12:
    print((B // 2))
else:
    print((0))

-if 6 <= A <= 12: +elif 6 <= A <= 12: -if A <= 5: +else: