#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec;
  int nm = n;
  if (n % 2 == 0) nm--;
  for (int i = nm; i >= 1; i = i - 2) vec.push_back(i);
  nm = n;
  if (nm % 2 != 0) nm--;
  for (int i = nm; i >= 1; i = i - 2) {
    if (abs(vec[vec.size() - 1] - i) != 1) vec.push_back(i);
  }
  cout << vec.size() << endl;
  for (int i = 0; i < vec.size(); ++i) cout << vec[i] << " ";
  return 0;
}
