#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  scanf("%d", &n);
  if (n == 1)
    printf("1\n1\n");
  else if (n == 2)
    printf("1\n1\n");
  else if (n == 3)
    printf("2\n1 3\n");
  else if (n == 4)
    printf("4\n2 4 1 3\n");
  else {
    printf("%d\n", n);
    for (j = 2; j <= n; j += 2) printf("%d ", j);
    for (j = 1; j <= n; j += 2) printf("%d ", j);
  }
  return 0;
}
