#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "1\n1\n";
    exit(0);
  }
  if (n == 2) {
    cout << "1\n1\n";
    exit(0);
  }
  if (n == 3) {
    cout << "2\n1 3\n";
    exit(0);
  }
  if (n == 4) {
    cout << "4\n3 1 4 2\n";
    exit(0);
  }
  cout << n << "\n";
  for (int i = 1; i <= n; i++) {
    if (i % 2) {
      cout << i << " ";
    }
  }
  for (int i = 1; i <= n; i++) {
    if (!(i % 2)) {
      cout << i << " ";
    }
  }
  cout << "\n";
  return 0;
}
