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