#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  solve();
  return 0;
}
void solve() {
  int i, n;
  cin >> n;
  if (n == 1 || n == 2) {
    cout << 1 << "\n" << 1;
    return;
  } else if (n == 3) {
    cout << 2 << "\n" << 1 << " " << 3;
    return;
  } else {
    cout << n << "\n";
    for (i = n; i > 0; i--) {
      if (i & 1) {
        cout << i << " ";
      }
    }
    for (i = n; i > 0; i--) {
      if (!(i & 1)) {
        cout << i << " ";
      }
    }
  }
}
