#include using namespace std; using ll = long long; int main () { ll N, S; cin >> N >> S; vector ans; for (ll i = N; i > 0; i --) { if (S >= i) { ans.push_back(i); S -= i; } } cout << ans.size() << endl; reverse(ans.begin(), ans.end()); for (auto a : ans) { cout << a << (a == ans.back() ? "" : " "); } cout << endl; }