#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e17;
const int N = 1234567;
int n;
vector<int> ans;
int main() {
  scanf("%d", &n);
  for (int i = n; i >= 1; i--)
    if (i % 2 == 1) ans.push_back(i);
  if (n > 3) {
    for (int i = n; i >= 1; i--)
      if (i % 2 == 0) ans.push_back(i);
  }
  printf("%d\n", int(ans.size()));
  for (auto x : ans) {
    printf("%d ", x);
  }
  return 0;
}
