#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long INF = 1ll << 60;
const double Inf = 1e20;
const double eps = 1e-9;
void gmax(int &a, int b) { a = (a > b ? a : b); }
void gmin(int &a, int b) { a = (a < b ? a : b); }
vector<int> Ans;
int n;
int main() {
  scanf("%d", &n);
  if (n % 2 == 0) {
    for (int i = 1; i <= n; i += 2) Ans.push_back(i);
    for (int i = 2; i <= n; i += 2) Ans.push_back(i);
    for (int i = 1; i <= n; i += 2) Ans.push_back(i);
  } else {
    for (int i = 2; i <= n; i += 2) Ans.push_back(i);
    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 (auto p : Ans) printf("%d ", p);
  return 0;
}
