#include <bits/stdc++.h>
using namespace std;
int n;
vector<char> ans;
int main() {
  scanf("%d", &n);
  while (n) {
    if (n & 1 ^ 1)
      n -= 2, ans.emplace_back('2');
    else
      n -= 3, ans.emplace_back('3');
  }
  printf("%d\n", (int)ans.size());
  for (auto x : ans) printf("%c ", x);
  puts("");
  return 0;
}
