#include <bits/stdc++.h>
const int maxn = 5100;
int a[maxn], opt;
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1 || n == 2) return printf("1\n1\n"), 0;
  for (int i = n; i >= 1; i--)
    if (i & 1) a[++opt] = i;
  if (n > 3)
    for (int i = n; i >= 1; i--)
      if (!(i & 1)) a[++opt] = i;
  printf("%d\n", opt);
  for (int i = 1; i <= opt; i++) printf("%d ", a[i]);
  printf("\n");
  return 0;
}
