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