#include <bits/stdc++.h>
const unsigned int M = 1000000007;
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> fin;
  if (n != 2 && n != 3) {
    if (n % 2 == 0) {
      for (int x = 2, m = 0; m < n / 2; x += 2, m++) fin.push_back(x);
      for (int x = 1, m = 0; m < n / 2; x += 2, m++) fin.push_back(x);
    } else {
      for (int x = 2, m = 0; m < n / 2; x += 2, m++) fin.push_back(x);
      for (int x = 1, m = 0; m <= n / 2; x += 2, m++) fin.push_back(x);
    }
    cout << n << endl;
    for (int x = 0; x < fin.size(); x++) cout << fin[x] << " ";
    cout << endl;
  } else {
    if (n == 3)
      cout << 2 << endl << 1 << " " << 3 << endl;
    else
      cout << 1 << endl << 1 << endl;
  }
  return 0;
}
