#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << n << endl;
    cout << n << endl;
  } else if (n == 2) {
    cout << n - 1 << endl;
    printf("1\n");
  } else if (n == 3) {
    cout << "2" << endl;
    printf("1 3\n");
  } else if (n == 4) {
    cout << n << endl;
    printf("3 1 4 2\n");
  } else {
    int m = n / 2;
    int nn = m + 1;
    cout << n << endl;
    if (n % 2 == 1) {
      for (int i = 1; i <= m; i++) {
        cout << " " << i << " " << ++nn;
      }
      cout << " " << m + 1 << endl;
    } else {
      for (int i = 1; i <= m; i++) {
        cout << " " << i << " " << ++nn - 1;
      }
    }
  }
  return 0;
}
