#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <typename T>
T gcd(T a, T b) {
  T m;
  while (b != T(0)) {
    m = a % b;
    a = b;
    b = m;
  }
  return a;
}
template <typename T>
T lcm(T a, T b) {
  return a == 0 && b == 0 ? 0 : (a / gcd(a, b)) * b;
}
int solve() {
  int n;
  cin >> n;
  if (n == 2) {
    printf("3\n");
    printf("2 1 2\n");
    return 0;
  }
  if (n == 3) {
    printf("4\n");
    printf("2 1 3 2\n");
    return 0;
  }
  std::vector<int> ans;
  if (n & 1) {
    for (int i = 2; i < n; i += 2) ans.push_back(i);
    ans.push_back(n);
    for (int i = 1; i < n; i += 2) ans.push_back(i);
    for (int i = 2; i < n; i += 2) ans.push_back(i);
  } else {
    for (int i = 2; i < n; i += 2) ans.push_back(i);
    ans.push_back(n - 1);
    ans.push_back(n);
    for (int i = 1; i < n; i += 2) ans.push_back(i);
    for (int i = 2; i < n; i += 2) ans.push_back(i);
  }
  printf("%d\n", (int)ans.size());
  for (int i : ans) printf("%d ", i);
  return 0;
}
int main(int argc, char* argv[]) {
  ::std::ios::sync_with_stdio(false);
  ::std::cin.tie(0);
  ::std::cout.tie(0);
  solve();
  return 0;
}
