#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f;
const int N = 1e5 + 2;
int main() {
  int n;
  scanf("%d", &n);
  int mid = (n + 1) / 2;
  int pos = mid;
  if (n == 2 || n == 1) return printf("1\n1\n"), 0;
  if (n == 3) return printf("2\n1 3\n"), 0;
  if (n == 4) return printf("4\n2 4 1 3\n"), 0;
  if (!(n & 1)) pos++;
  printf("%d\n", n);
  if (n & 1) printf("%d ", mid);
  for (int i = 1; i < pos; ++i) printf("%d %d ", i, i + mid);
  return 0;
}
