#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> v;
  if (n == 2)
    cout << "3\n2 1 2";
  else if (n == 3)
    cout << "4\n2 1 3 2";
  else if (n == 4)
    cout << "6\n2 3 1 4 2 3";
  else {
    cout << ((n / 2) + ((n + 1) / 2) + (n / 2)) << endl;
    for (int i = 2; i <= n; i += 2) cout << i << " ";
    for (int i = 1; i <= n; i += 2) cout << i << " ";
    for (int i = 2; i <= n; i += 2) cout << i << " ";
  }
}
