#include <bits/stdc++.h>
using namespace std;
deque<int> a;
int main() {
  int n, k = -1;
  cin >> n;
  int i = 1, j = n;
  if (n == 1) {
    cout << "1\n1";
  } else if (n == 2) {
    cout << "1\n1";
  } else if (n == 3) {
    cout << "2\n1 3";
  } else {
    cout << n << "\n";
    for (; j - i > 1; ++i, --j) {
      a.push_back(j);
      a.push_back(i);
    }
    if (j == i)
      a.push_front(j);
    else {
      a.push_back(j);
      a.push_front(i);
    }
  }
  for (i = 0; i < a.size(); ++i) cout << a[i] << " ";
  return 0;
}
