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