#include <bits/stdc++.h>
using namespace std;
vector<int> v;
vector<int>::iterator it;
int main() {
  long long int n, r, i, k = 2, m, p = 1, a, b, flag = 0, j, temp;
  cin >> n;
  m = n;
  if (n == 2) {
    cout << 1 << endl << 1;
    return 0;
  }
  if (n == 3) {
    cout << 2 << endl << "1 3";
    return 0;
  }
  if (n == 1) {
    cout << 1 << endl << 1;
    return 0;
  }
  if (n == 4) {
    cout << 4 << endl << "3 1 4 2";
    return 0;
  }
  if (n > 4) {
    cout << n << endl;
    for (i = 0; i <= n / 2; i++) {
      if (p <= n) {
        cout << p << " ";
        flag++;
      }
      p = p + 2;
    }
    for (i; i < n; i++) {
      cout << k << " ";
      k = k + 2;
      flag++;
    }
    if (flag != n) cout << k;
  }
  return 0;
}
