#include #include using namespace std; int main(){ long long n,s;cin>>n>>s; s = n*(n+1)/2-s; set a; for(int i = n; i >= 1; i--){ if(s >= i){ s -= i; a.insert(i); } } bool ex = false; cout << n-a.size() << endl; for(int i = 1; n >= i; i++){ if(a.count(i))continue; if(ex)cout << " "; else ex = true; cout << i; } cout << endl; }