#include <bits/stdc++.h>
using namespace std;
int first[2500 + 100];
int second[2500 + 100];
int main() {
  int n;
  cin >> n;
  if (n == 1 || n == 2) {
    cout << 1 << endl << 1;
    return 0;
  }
  if (n == 3) {
    cout << 2 << endl << 1 << " " << 3;
    return 0;
  }
  if (n % 2 == 1) {
    cout << n << endl;
    for (int i = n; i > 0; i -= 2) cout << i << ' ';
    for (int i = n - 1; i > 0; i -= 2) cout << i << ' ';
  } else {
    cout << n << endl;
    int f = 1, s = n;
    for (int i = n - 1; i > 0; i -= 2) cout << i << ' ';
    for (int i = n; i > 0; i -= 2) cout << i << ' ';
  }
}
