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