#include <bits/stdc++.h>
using namespace std;
int n;
void solve(int n) {
  if (n <= 2) {
    cout << "1\n1";
  } else if (n == 3) {
    cout << "2\n1 3";
  } else if (n == 4) {
    cout << "4\n3 1 4 2";
  } else if (n == 5) {
    cout << "5\n1 4 2 5 3";
  } else {
    cout << n << endl;
    if (n % 2 == 1) {
      cout << n << " ";
    }
    for (int i = 1; i <= n / 2; i++) {
      cout << i << " " << (n / 2 + i);
      if (i * 2 < n) {
        cout << " ";
      }
    }
  }
}
int main() {
  while (cin >> n) {
    solve(n);
    cout << endl;
  }
  return 0;
}
