#include <bits/stdc++.h>
using namespace std;
long long n, m, k, a[300001];
int main() {
  cin >> n;
  if (n <= 2) {
    cout << 1 << endl << 1 << endl;
    return 0;
  }
  if (n == 3) {
    cout << 2 << endl;
    cout << 1 << " " << 3 << endl;
    return 0;
  }
  if (n == 4) {
    cout << 4 << endl;
    cout << 3 << " " << 1 << " " << 4 << " " << 2 << endl;
    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 << " ";
  cout << endl;
  return 0;
}
