#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
long long int power(long long int x, long long int y) {
  long long int t = 1;
  while (y > 0) {
    if (y % 2)
      y -= 1, t = t * x % mod;
    else
      y /= 2, x = x * x % mod;
  }
  return t;
}
int main() {
  long long int n, i, j, k, l;
  cin >> n;
  if (n == 1) {
    cout << 1 << endl;
    cout << 1 << endl;
  } else if (n == 2) {
    cout << 1 << endl;
    cout << 1 << endl;
  } else if (n == 3) {
    cout << 2 << endl;
    cout << 1 << " " << 3 << endl;
  } else if (n == 4) {
    cout << 4 << endl;
    cout << 3 << " " << 1 << " " << 4 << " " << 2 << endl;
  } else {
    cout << n << endl;
    for (i = 1; i <= n; i = i + 2) {
      cout << i << " ";
    }
    for (i = 2; i <= n; i = i + 2) {
      cout << i << " ";
    }
    cout << endl;
  }
  return 0;
}
