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