n, s = map(int,input().split()) ans = [] for i in range(n, 0, -1): if sum(ans) + i <= s: ans.append(i) ans.reverse() print(len(ans)) print(*ans)