#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << 1 << endl;
    cout << 1 << endl;
  } else if (n == 2) {
    cout << 1 << endl;
    cout << 1 << endl;
  } else if (n == 3) {
    cout << 2 << endl;
    cout << "1 3" << endl;
  } else if (n == 4) {
    cout << 4 << endl;
    cout << "2 4 1 3" << endl;
  } else {
    cout << n << endl;
    for (long long i = 1; i <= n; i += 2) {
      cout << i << " ";
    }
    for (long long i = 2; i <= n; i += 2) {
      cout << i << " ";
    }
  }
  return 0;
}
