#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 1;
const long long inf = 4e18;
const long long M = 1e9 + 7;
const int lg = 21;
int n, sum, a, b, dp[maxn];
vector<int> v[2];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++)
    if (i % 2)
      v[1].push_back(i);
    else
      v[0].push_back(i);
  b = 1;
  if (v[0].size() > v[1].size()) swap(a, b);
  cout << 2 * v[a].size() + v[b].size() << endl;
  for (int i = 0; i < v[a].size(); i++) cout << v[a][i] << " ";
  for (int i = 0; i < v[b].size(); i++) cout << v[b][i] << " ";
  for (int i = 0; i < v[a].size(); i++) cout << v[a][i] << " ";
  return 0;
}
