#include #define show(x) std::cerr << #x << " = " << x << std::endl constexpr int MAX = 1000004; bool isprime[MAX + 1]; int main() { int K; std::cin >> K; auto solve = [](int K) { std::vector ans; if (K == 0) { return ans; } const int a = std::sqrt(K), b = K / a; for (int i = 0; i < a; i++) { ans.push_back(2); } for (int i = 0; i < b; i++) { ans.push_back(5); } K -= a * b; if (K == 0) { return ans; } const int c = std::sqrt(K), d = K / c; for (int i = 0; i < c; i++) { ans.push_back(4); } for (int i = 0; i < d; i++) { ans.push_back(7); } K -= c * d; if (K == 0) { return ans; } for (int i = 0; i < K; i++) { ans.push_back(20); } ans.push_back(23); return ans; }; const auto ans = solve(K); std::cout << ans.size() << std::endl; for (const auto e : ans) { std::cout << e << " "; } std::cout << std::endl; return 0; }