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