#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  if (n <= 2) {
    cout << "1" << endl;
    cout << "1" << endl;
    return 0;
  }
  if (n == 3) {
    cout << "2" << endl;
    cout << "1 3" << endl;
    return 0;
  }
  cout << n << endl;
  deque<int> q;
  for (int i = 2; i <= n; i += 2) {
    q.push_front(i);
  }
  for (int i = 1; i <= n; i += 2) {
    q.push_front(i);
  }
  for (auto i : q) {
    cout << i << " ";
  }
  cout << endl;
  return 0;
}
