#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  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 (i = 2; i <= n; i += 2) cout << i << " ";
  for (i = 1; i <= n; i += 2) cout << i << " ";
}
