#include <bits/stdc++.h>
const int INF = 1e9;
const int N = 312312;
const double PI = 3.1415926535897932384626433832795;
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1 || n == 2) {
    cout << 1 << "\n" << 1 << endl;
    return 0;
  }
  if (n == 3) {
    cout << "2\n1 3\n";
    return 0;
  }
  deque<int> q;
  for (int i = 1; i < (n + 1) / 2; i++) {
    q.push_back(i);
    q.push_back(n - i + 1);
  }
  cout << n << endl;
  if (n % 2 == 0)
    q.push_back(n / 2), q.push_front(n / 2 + 1);
  else
    q.push_front(n / 2 + 1);
  for (int i = 0; i < (int)q.size(); i++) printf("%d ", q[i]);
  cout << endl;
  return 0;
}
