#include <bits/stdc++.h>
using namespace std;
const int Maxn = 3e5 + 7;
const int inf = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  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;
    cout << 3 << ' ' << 1 << ' ' << 4 << ' ' << 2;
    return 0;
  }
  cout << n << endl;
  for (int i = 1; i <= n; i += 2) cout << i << ' ';
  for (int i = 2; i <= n; i += 2) cout << i << ' ';
}
