#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const int MAXN = 1e5 + 5;
const int MAXM = 9e4 + 500;
const int N = 1e3 + 5;
const double EPS = 1e-9;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int i, j, d;
int n, k, m;
vector<int> g[MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n == 1 || n == 2) {
    cout << 1 << endl;
    cout << 1;
    return 0;
  }
  if (n == 3) {
    cout << 2 << endl;
    cout << 1 << " " << 3;
    return 0;
  }
  if (n == 4) {
    cout << 4 << "\n";
    cout << "2 4 1 3";
    return 0;
  }
  cout << n << endl;
  for (i = 1; i <= n; i += 2) cout << i << " ";
  for (i = 2; i <= n; i += 2) cout << i << " ";
  return 0;
}
