#include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; map> memo; void make(){ REP(N,1,251){ rep(a,N+1){ rep(b,N+1-a){ int c = N-(a+b); if(c < 0) continue; int sum = a*(a-1) + a*b + b*c; if(0<=sum && sum<=10000){ memo[sum] = {a,b,c}; if(memo.size() == 10000) return; } if(sum >= 10000) break; } } } } int main(){ int K; cin >> K; make(); vector ret = memo[K]; cout << ret[0] + ret[1] + ret[2] << endl; vector res; rep(i,ret[0]) res.push_back(1); rep(i,ret[1]) res.push_back(2); rep(i,ret[2]) res.push_back(3); rep(i,res.size()){ if(i>0) cout << " "; cout << res[i]; } return 0; }