#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-6;
vector<int> Solve(int n) {
  vector<int> res;
  if (n <= 2)
    res.emplace_back(1);
  else if (n == 3) {
    res.emplace_back(1);
    res.emplace_back(3);
  } else {
    for (int i = 2; i <= n; i += 2) res.emplace_back(i);
    for (int i = 1; i <= n; i += 2) res.emplace_back(i);
  }
  return res;
}
int main() {
  { ; };
  int n;
  scanf("%d", &n);
  vector<int> res = Solve(n);
  printf("%d\n", ((int)(res).size()));
  for (int i = 0; i < ((int)(res).size()); i++)
    printf("%d%c", res[i], " \n"[i == ((int)(res).size()) - 1]);
  return 0;
}
