#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a, b, c;
  a = n / 2;
  b = n - a;
  cout << 2 * a + b << endl;
  for (int i = 2; i <= n; i += 2) cout << i << " ";
  for (int i = 1; i <= n; i += 2) cout << i << " ";
  if (n % 2 == 1) n--;
  for (int i = n; i > 0; i -= 2) cout << i << " ";
}
