#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:512000000")
using namespace std;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const int INF = INT_MAX;
const long long INFLL = (long long)1e18;
const double PI = acos(-1.0);
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
T GCD(T x, T y) {
  return y ? GCD<T>(y, x % y) : x;
}
template <typename T>
T LCM(T x, T y) {
  return x / GCD<T>(x, y) * y;
}
int n;
void Load() { cin >> n; }
int Solve() {
  if (n <= 2) return !printf("1\n1");
  if (n == 3) return !printf("2\n1 3");
  if (n == 4) return !printf("4\n3 1 4 2");
  cout << n << endl;
  for (int i = 1; i <= n; i += 2) cout << i << ' ';
  for (int i = 2; i <= n; i += 2) cout << i << ' ';
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  Load();
  return Solve();
}
