#include <bits/stdc++.h>
using namespace std;
int n;
int ans;
bool one, two, three;
vector<int> v;
int main() {
  scanf("%d", &n);
  while (one == false || two == false || three == false) {
    for (int i = 1; i <= n; i++) {
      if (!one) {
        if (i % 2 == 0) {
          ans++;
          v.push_back(i);
        }
        if ((n % 2 == 0 && i == n) || (n % 2 != 0 && i == n - 1)) {
          one = true;
          break;
        }
      } else if (!two) {
        if (i % 2 != 0) {
          ans++;
          v.push_back(i);
        }
        if ((n % 2 != 0 && i == n) || (n % 2 == 0 && i == n - 1)) {
          two = true;
          break;
        }
      } else if (!three) {
        if (i % 2 == 0) {
          ans++;
          v.push_back(i);
        }
        if ((n % 2 == 0 && i == n) || (n % 2 != 0 && i == n - 1)) {
          three = true;
          goto A;
        }
      }
    }
  }
A:
  printf("%d\n", ans);
  for (int i = 0; i < v.size(); i++) {
    printf("%d ", v[i]);
  }
}
