#include <bits/stdc++.h>
using namespace std;
vector<int> q;
int d, c, n;
int main() {
  cin >> n;
  for (int i = 1; i * 2 <= n; ++i) q.push_back(i * 2);
  for (int i = 1; i * 2 - 1 <= n; ++i) q.push_back(i * 2 - 1);
  for (int i = 1; i * 2 <= n; ++i) q.push_back(i * 2);
  cout << q.size() << endl;
  for (int i = (0); i <= (q.size() - 1); ++i) cout << q[i] << " ";
  return 0;
}
