#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  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 {
    vector<int> a;
    if (n % 2 == 1) {
      a.push_back(n);
      n--;
    }
    for (int i = 1; i <= n / 2; i++) {
      a.push_back(n / 2 + i);
      a.push_back(i);
    }
    cout << (int)a.size() << "\n";
    for (int i = 0; i <= a.size() - 1; i++) printf("%d ", a[i]);
  }
  return 0;
}
