#include <bits/stdc++.h>
using namespace std;
long long n;
deque<long long> Q;
int main() {
  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 {
    cout << n << endl;
    if (n % 2) {
      Q.push_back(n / 2 + 1);
    }
    long long c = 0;
    long long r = n;
    long long l = 1;
    while (l < r) {
      if (c % 2) {
        Q.push_back(r);
        Q.push_front(l);
      } else {
        Q.push_back(l);
        Q.push_front(r);
      }
      c++;
      l++;
      r--;
    }
    while (!Q.empty()) {
      cout << Q.front() << ' ';
      Q.pop_front();
    }
  }
}
