a,b=list(map(int,input().split()));print((b//-~(a<13)*(a>5)))
a,b=list(map(int,input().split()))

print(((b>>(a<13))*(a>5)))
a, b = list(map(int, input().split()))
print((b // -~(a < 13) * (a > 5)))

a, b = list(map(int, input().split()))
print(((b >> (a < 13)) * (a > 5)))

-print((b // -~(a < 13) * (a > 5))) +print(((b >> (a < 13)) * (a > 5)))