#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int j = 1;
  int n1 = n;
  if (n == 1 || n == 2)
    n1 = 1;
  else if (n == 3)
    n1 = 2;
  cout << n1 << endl;
  int cnt = 0;
  for (j = n - (n % 2 == 0); j >= 1 && cnt < n1; j -= 2) {
    ++cnt;
    if (j < n - (n % 2 == 0)) cout << ' ';
    cout << j;
  }
  for (j = n - (n & 1); j >= 1 && cnt < n1; j -= 2) {
    cout << ' ' << j;
    ++cnt;
  }
}
