#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n < 5) {
    switch (n) {
      case 1:
        cout << 1 << '\n';
        cout << 1;
        break;
      case 2:
        cout << 1 << '\n';
        cout << 1;
        break;
      case 3:
        cout << 2 << '\n';
        cout << 1 << ' ' << 3;
        break;
      case 4:
        cout << 4 << '\n';
        cout << 3 << ' ' << 1 << ' ' << 4 << ' ' << 2;
        break;
    }
  } else {
    cout << n << '\n';
    for (int i = 0; i < n / 2; i++) {
      cout << n - i << ' ' << n / 2 - i << ' ';
    }
    if (n % 2 == 1) cout << n / 2 + 1;
  }
  return 0;
}
