#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  if (n == 2) {
    cout << 1 << endl << 1;
    return 0;
  }
  if (n == 3) {
    cout << "2" << endl << "1 3";
    return 0;
  }
  cout << n << endl;
  for (int i = 1; 2 * i <= n; i++) cout << 2 * i << " ";
  for (int i = 1; 2 * i - 1 <= n; i++) cout << 2 * i - 1 << " ";
  return 0;
}
