#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  int eve[n];
  int odd[n];
  if (n <= 4) {
    if (n == 1 || n == 2) {
      cout << 1 << endl;
      cout << 1;
    } else if (n == 3) {
      cout << 2 << endl;
      cout << 1 << ' ' << 3;
    } else {
      cout << 4 << endl;
      cout << 2 << ' ' << 4 << ' ' << 1 << ' ' << 3;
    }
  } else {
    for (int i = 0; i <= n; i++) {
      eve[i] = 0;
      odd[i] = 0;
    }
    int o = 0, e = 0;
    for (int i = 1; i <= n; i += 2) {
      odd[o++] = i;
    }
    for (int i = 2; i <= n; i += 2) {
      eve[e++] = i;
    }
    cout << n << endl;
    for (int i = 0; i < o; i++) cout << odd[i] << ' ';
    for (int j = 0; j < e; j++) cout << eve[j] << ' ';
  }
  return 0;
}
