#include <bits/stdc++.h>
using namespace std;
long long int cnt, b, n, a, gnt, des, m;
int Max, Min;
string s;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  if (n == 1) {
    cout << 1 << endl << 1;
    return 0;
  }
  if (n == 2) {
    cout << 1 << endl << 1;
    return 0;
  }
  if (n == 3) {
    cout << 2 << endl << 1 << " " << 3;
    return 0;
  }
  if (n == 4) {
    cout << 4 << endl << 3 << " " << 1 << " " << 4 << " " << 2;
    return 0;
  }
  cout << n << endl;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) cout << i << " ";
  }
  for (int i = 2; i <= n; i++) {
    if (i % 2 == 0) cout << i << " ";
  }
  return 0;
}
