#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, n, t, j;
  int A[5001];
  cin >> n;
  if (n == 2) {
    t = 1;
    A[0] = 1;
  } else if (n == 3) {
    t = 2;
    A[0] = 1;
    A[1] = 3;
  } else if (n == 4) {
    t = 4;
    A[0] = 2;
    A[1] = 4;
    A[2] = 1;
    A[3] = 3;
  } else {
    j = 1;
    for (i = 0; i < n; i = i + 2) {
      A[i] = j;
      j++;
    }
    for (i = 1; i < n; i = i + 2) {
      A[i] = j;
      j++;
    }
    t = n;
  }
  cout << t << "\n";
  for (i = 0; i < t; i++) cout << A[i] << " ";
  return 0;
}
