import sys input = sys.stdin.readline N,M=list(map(int,input().split())) ANS=0 for i in range(31): if i%2==0: if M & (1<