#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; long long s; cin >> n >> s; vector ans; for (int i = n; i >= 1; i--) { if (s >= i) { ans.push_back(i); s -= i; } } reverse(ans.begin(), ans.end()); cout << ans.size() << endl; for (int i = 0; i < ans.size(); i++) { cout << ans[i] << " "; } cout << endl; }