N, M = map(int, input().split()) ans = 0 small = [N, 0] for i in reversed(range(30)): if 1<