#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long int n;
  cin >> n;
  if (n == 1) {
    cout << n << endl << n;
    return 0;
  } else if (n == 2) {
    cout << 1 << endl << 1;
    return 0;
  } else if (n == 3) {
    cout << 2 << endl << 1 << ' ' << 3;
    return 0;
  } else if (n == 4) {
    cout << 4 << endl << 2 << ' ' << 4 << ' ' << 1 << ' ' << 3;
    return 0;
  }
  cout << n << endl;
  for (int j = 1; j <= n; ++ ++j) {
    cout << j << ' ';
  }
  for (int j = 2; j <= n; ++ ++j) {
    cout << j << ' ';
  }
  return 0;
}
