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