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