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