#include <bits/stdc++.h>
using namespace std;
int a[200010];
int main() {
  int n;
  scanf("%d", &n);
  if (n == 2) {
    printf("3\n");
    printf("2 1 2\n");
  } else {
    int sum = 0;
    for (int i = 2; i <= n; i += 2) {
      a[sum++] = i;
    }
    for (int i = 1; i <= n; i += 2) {
      a[sum++] = i;
    }
    for (int i = 2; i <= n; i += 2) {
      a[sum++] = i;
    }
    printf("%d\n", sum);
    for (int i = 0; i < sum - 1; i++) {
      printf("%d ", a[i]);
    }
    printf("%d\n", a[sum - 1]);
  }
  return 0;
}
