#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  if (N == 1 || N == 2) {
    cout << 1 << '\n' << 1;
  } else if (N == 3) {
    cout << 2 << '\n' << 1 << " " << 3;
  } else {
    cout << N << '\n';
    for (int i = 2; i <= N; i += 2) cout << i << " ";
    for (int i = 1; i <= N; i += 2) cout << i << " ";
  }
}
