#include <bits/stdc++.h>
using namespace std;
long long n, q, a[200000];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n == 1) {
    cout << "1\n1\n";
    return 0;
  }
  if (n == 2) {
    cout << "1\n1\n";
    return 0;
  }
  if (n == 3) {
    cout << "2\n1 3\n";
    return 0;
  }
  if (n == 4) {
    cout << "4\n3 1 4 2\n";
    return 0;
  }
  if (n == 5) {
    cout << "5\n1 3 5 2 4\n";
    return 0;
  }
  cout << n << '\n';
  if (n % 2) {
    cout << n << ' ';
    for (long long i = 1; i <= n / 2; i++) {
      cout << i << ' ' << i + (n / 2) << ' ';
    }
  } else {
    for (long long i = 1; i <= n / 2; i++) {
      cout << i << ' ' << i + (n / 2) << ' ';
    }
  }
  return 0;
}
