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