#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << n << "\n";
    cout << "1";
    return 0;
  }
  if (n == 2 || n == 3) {
    int size = ceil(n / 2.0);
    cout << size << "\n";
    int odd = 1;
    for (int i = 1; i <= size; i++) {
      cout << odd << " ";
      odd += 2;
    }
    return 0;
  }
  if (n == 4) {
    cout << n << "\n";
    cout << "3 1 4 2";
    return 0;
  }
  int even = 2, odd = 1;
  cout << n << "\n";
  for (int i = 1; i <= (n / 2); i++) {
    cout << even << " ";
    even += 2;
  }
  int size = ceil(n / 2.0);
  for (int i = 1; i <= size; i++) {
    cout << odd << " ";
    odd += 2;
  }
}
