#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000000000001ll;
const int INFint = (1 << 28);
const int MOD = 1000000007;
const long double EPS = 1e-8;
bool comp(int x, int y) { return (x > y); }
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  if (n == 2) {
    cout << 1 << endl;
    cout << 1 << endl;
    return 0;
  }
  if (n == 4) {
    cout << 4 << endl;
    cout << 2 << ' ' << 4 << ' ' << 1 << ' ' << 3 << endl;
    return 0;
  }
  if (n == 3) {
    cout << 2 << endl;
    cout << 1 << ' ' << 3 << endl;
    return 0;
  }
  cout << n << endl;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      cout << i / 2 + 1 << ' ';
    } else {
      cout << ((n + 1) / 2 + i / 2) + 1 << ' ';
    }
  }
  return 0;
}
