#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i;
  cin >> n;
  if (n > 4) {
    cout << n << '\n';
    for (i = n; i > 0; i -= 2) cout << i << " ";
    for (i = n - 1; i > 0; i -= 2) cout << i << " ";
  } else {
    if (n == 3) {
      cout << "2" << '\n';
      cout << "1 3";
    }
    if (n == 1) {
      cout << "1" << '\n' << "1";
    }
    if (n == 2) {
      cout << "1" << '\n' << "1";
    }
    if (n == 4) {
      cout << "4" << '\n' << " 3 1 4 2";
    }
  }
}
