#include <bits/stdc++.h>
using namespace std;
int cnt;
int main(void) {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> ans;
  for (int i = 1; i < n; i += 2) {
    ans.emplace_back(i);
  }
  for (int i = 0; i < n; i += 2) {
    ans.emplace_back(i);
  }
  for (int i = 1; i < n; i += 2) {
    ans.emplace_back(i);
  }
  cout << ans.size() << endl;
  for (int x : ans) cout << x + 1 << " ";
  cout << endl;
  return 0;
}
