#include <bits/stdc++.h>
using namespace std;
void enter() {
  int n = 0;
  vector<int> ans[2];
  cin >> n;
  for (int i = 1; i <= n; i++)
    if (i % 2 == 1) ans[0].push_back(i);
  for (int i = 1; i <= n; i++)
    if (i % 2 == 0) ans[0].push_back(i);
  for (int i = 1; i <= n; i++)
    if (i % 2 == 1) ans[0].push_back(i);
  for (int i = 1; i <= n; i++)
    if (i % 2 == 0) ans[1].push_back(i);
  for (int i = 1; i <= n; i++)
    if (i % 2 == 1) ans[1].push_back(i);
  for (int i = 1; i <= n; i++)
    if (i % 2 == 0) ans[1].push_back(i);
  if (ans[0].size() < ans[1].size()) {
    cout << ans[0].size() << endl;
    for (int i = 0; i < ans[0].size(); i++) cout << ans[0][i] << " ";
  } else {
    cout << ans[1].size() << endl;
    for (int i = 0; i < ans[1].size(); i++) cout << ans[1][i] << " ";
  }
}
int main() {
  enter();
  return 0;
}
