#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
const long long int N = 1e5 + 5;
long long int mod = 998244353;
long long int dx[4] = {0, 0, +1, -1};
long long int dy[4] = {+1, -1, 0, 0};
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> ve, vo;
  for (long long int i = 1; i < n + 1; i++) {
    if (i & 1)
      vo.push_back(i);
    else
      ve.push_back(i);
  }
  if ((long long int)ve.size() < (long long int)vo.size()) {
    long long int tt = 2 * (long long int)ve.size() + (long long int)vo.size();
    cout << tt << "\n";
    for (long long int i = 0; i < (long long int)ve.size(); i++)
      cout << ve[i] << " ";
    for (long long int i = 0; i < (long long int)vo.size(); i++)
      cout << vo[i] << " ";
    for (long long int i = 0; i < (long long int)ve.size(); i++)
      cout << ve[i] << " ";
  } else {
    long long int tt = 2 * (long long int)vo.size() + (long long int)ve.size();
    cout << tt << "\n";
    for (long long int i = 0; i < (long long int)vo.size(); i++)
      cout << vo[i] << " ";
    for (long long int i = 0; i < (long long int)ve.size(); i++)
      cout << ve[i] << " ";
    for (long long int i = 0; i < (long long int)vo.size(); i++)
      cout << vo[i] << " ";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t = 1;
  while (t--) solve();
  return 0;
}
