#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; ll comb(ll n, ll k) { if (n < k) return 0; else if (n == k || k == 0) return 1; else return comb(n - 1, k - 1) + comb(n - 1, k); } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int k; cin >> k; if (k == 0) { cout << 1 << endl; cout << 1 << endl; return 0; } else { for (ll a = 0; a <= 250; a++) { for (ll b = 0; b <= (250 - a); b++) { if (comb(a, 2) + a * b == k) { cout << (a + b) << endl; for (int i = 0; i < a; i++) { cout << 1 << " "; } for (int i = 0; i < b; i++) { cout << 2 << " "; } cout << endl; return 0; } } } } return 0; }