#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", ((n >> 1) << 1) + ((n + 1) >> 1));
  for (int i = 2; i <= n; i += 2) printf("%d ", i);
  for (int i = n & 1 ? n : n - 1; i > 0; i -= 2) printf("%d ", i);
  for (int i = 2; i <= n; i += 2) printf("%d ", i);
  printf("\n");
  return 0;
}
