#include <bits/stdc++.h>
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
using namespace std;
using ll = long long;
using ld = long double;
const ll MOD = 1e+9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed;
  cout << setprecision(10);
  int n;
  cin >> n;
  if (n == 2)
    cout << 1 << '\n' << 1;
  else if (n == 3)
    cout << 2 << '\n' << 1 << ' ' << 3;
  else if (n == 4)
    cout << 4 << '\n' << 2 << ' ' << 4 << ' ' << 1 << ' ' << 3;
  else {
    cout << n << '\n';
    for (int i = 1; i <= n; i += 2) cout << i << ' ';
    for (int i = 2; i <= n; i += 2) cout << i << ' ';
  }
}
