#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, odd, even;
  cin >> n;
  int arr[n], k = 0;
  if (n % 2 == 0) {
    even = n;
    odd = n - 1;
  } else {
    even = n - 1;
    odd = n;
  }
  for (int i = odd; i >= 1; i -= 2) arr[k++] = i;
  for (int i = even; i >= 1; i -= 2)
    if (arr[k - 1] != i - 1 && arr[k - 1] != i + 1) arr[k++] = i;
  cout << k << endl << arr[0];
  for (int i = 1; i < k; i++) cout << " " << arr[i];
  cout << endl;
  return 0;
}
