#include #include using namespace std; int k; vector ans; int main() { int i; cin >> k; int val = 1; while (k > 0) { for (i = 1; i * (i - 1) / 2 <= k; i++); i--; int n = i; for (i = 0; i < n; i++) ans.push_back(val); k -= n * (n - 1) / 2; val += 2; } cout << ans.size() << endl; for (i = 0; i < ans.size(); i++) { cout << ans[i]; if (i + 1 < ans.size()) cout << " "; } cout << endl; return 0; }