#include <bits/stdc++.h>
using namespace std;
const int INF = 1E9;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "1" << endl;
    cout << "1";
    return 0;
  }
  if (n == 2) {
    cout << "1" << endl;
    cout << "1";
    return 0;
  }
  if (n == 3) {
    cout << "2" << endl;
    cout << "1 3";
    return 0;
  }
  if (n == 4) {
    cout << "4" << endl;
    cout << "2 4 1 3";
    return 0;
  }
  vector<bool> a(5005, false);
  cout << n << endl;
  for (int i = 1; i <= n; i += 2) {
    if (i > n) break;
    cout << i << " ";
    a[i] = true;
  }
  for (int i = 1; i <= n; i++) {
    if (i > n) break;
    if (a[i] == false) {
      cout << i << " ";
      a[i] = true;
    }
  }
  return 0;
}
