# 公式解説の2つの数列に分ける方式 N, K = map(int, input().split()) count = [0]*N for bit in range(1<>shift&1 == 1: first.append(shift) second.remove(shift) if first[-1] > second[0]: count[first[0]] += 1 ans = count[K-1] print(ans)