#include <bits/stdc++.h>
using namespace std;
int arr[5002];
int main() {
  int n, i;
  scanf("%d", &n);
  if (n <= 2) {
    printf("1\n1\n");
    return 0;
  }
  if (n == 3) {
    printf("2\n1 3\n");
    return 0;
  }
  int curr = (n & 1) ? n : n - 1;
  for (i = 0; i < n; i++) {
    if (curr < 0) curr = (n & 1) ? n - 1 : n;
    arr[i] = curr;
    curr -= 2;
  }
  printf("%d\n", n);
  for (i = 0; i < n; i++) printf("%d ", arr[i]);
  putchar('\n');
  return 0;
}
