#k桁目まで見たとき、1の個数がiこ、今j個1が連続しているものの個数 N,K=map(int,input().split()) s=bin(N)[2:] t=bin(K)[2:] mod=998244353 if len(s)