#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  if (n == 1 || n == 2)
    v.push_back(1);
  else if (n == 3) {
    v.push_back(1);
    v.push_back(3);
  } else if (n == 4) {
    v.push_back(3);
    v.push_back(1);
    v.push_back(4);
    v.push_back(2);
  } else {
    for (int i = 1; i <= n; i += 2) v.push_back(i);
    for (int i = 2; i <= n; i += 2) v.push_back(i);
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
  return 0;
}
