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