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