#include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define rep(i,n) for (int i=0;i < (int)(n);i++) void solve(){ int n; cin >> n; ll s; cin >> s; vector a(n); rep(i,n) a[i] = ll(n)-i; vector ans; for (int i = 0; i < n;i++){ if (s - a[i] >= 0){ ans.push_back(a[i]); s-=a[i]; } } cout << ans.size() << "\n"; for (auto e: ans){ cout << e << " "; } cout << "\n"; return; } int main(){ int tt = 1; //cin >> tt; while(tt--){ solve(); } return 0; }