#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  if (x == 1) {
    cout << 1 << endl;
    cout << 1 << endl;
  } else if (x == 2)
    cout << 1 << endl << 1 << endl;
  else if (x == 3) {
    cout << 2 << endl;
    cout << 1 << " " << 3 << endl;
  } else {
    cout << x << endl;
    for (int i = x; i >= 1; i--)
      if (i % 2 != 0) cout << i << " ";
    for (int i = x; i >= 1; i--)
      if (i % 2 == 0) cout << i << " ";
  }
  return 0;
}
