#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 3)
    cout << 2 << endl << "1 3";
  else if (n == 2)
    cout << 1 << endl << 1;
  else {
    cout << n << endl;
    for (int i = 1; i <= n / 2; i++) cout << i * 2 << ' ';
    for (int i = 1; i <= n / 2 + n % 2; i++) cout << i * 2 - 1 << ' ';
  }
}
