#include <bits/stdc++.h>
using namespace std;
int v[5010];
void print(int n) {
  printf("%d\n", n);
  for (int i = 0; i < n; i++) {
    printf("%d ", v[i]);
  }
  printf("\n");
}
bool check(int n) {
  for (int i = 1; i < n; i++) {
    if (abs(v[i] - v[i - 1]) == 1) {
      return false;
    }
  }
  return true;
}
int solve(int n) {
  if (n <= 2) {
    v[0] = 1;
    return 1;
  } else if (n == 3) {
    v[0] = 1;
    v[1] = 3;
    return 2;
  } else if (n == 4) {
    v[0] = 2;
    v[1] = 4;
    v[2] = 1;
    v[3] = 3;
    return 4;
  } else {
    int c = 1;
    for (int i = 0; i < n; i += 2) v[i] = c++;
    for (int i = 1; i < n; i += 2) v[i] = c++;
    return n;
  }
}
int main() {
  int n;
  scanf("%d", &n);
  print(solve(n));
  return 0;
}
