#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  int n;
  std::cin >> n;
  std::vector<int> v(n);
  if (n <= 2) {
    std::cout << 1 << std::endl;
    std::cout << 1 << std::endl;
  } else if (n == 3) {
    std::cout << 2 << std::endl;
    std::cout << "1 3" << std::endl;
  } else {
    int index = 0;
    for (int i = 2; i <= n; i += 2, index++) v[index] = i;
    for (int i = 1; i <= n; i += 2, index++) v[index] = i;
    std::cout << n << std::endl;
    std::cout << v[0];
    for (int i = 1; i < n; i++) std::cout << " " << v[i];
    std::cout << std::endl;
  }
  return 0;
}
