#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7, M = 3e5 + 5;
void Solution();
int n;
char check[100 * 1000 + 5];
vector<int> cur;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  Solution();
  return 0;
}
void Solution() {
  cin >> n;
  if (n % 2) {
    if (n == 1) {
      cout << "2\n1 1" << endl;
      return;
    } else {
      cout << (3 * n - 1) / 2 << endl;
    }
    cout << "2 1 ";
    for (long long int i = 0; i < n / 2 - 1; i++) {
      cout << 2 * i + 4 << " ";
      cout << 2 * i + 3 << " ";
      cout << 2 * i + 2 << " ";
    }
    cout << n << " ";
    cout << n - 1 << " ";
  } else {
    n--;
    if (n == 1) {
      cout << "3\n2 1 2" << endl;
      return;
    } else {
      cout << (3 * n - 1) / 2 + 2 << endl;
    }
    cout << "2 1 ";
    for (long long int i = 0; i < n / 2 - 1; i++) {
      cout << 2 * i + 4 << " ";
      cout << 2 * i + 3 << " ";
      cout << 2 * i + 2 << " ";
    }
    cout << n << " ";
    cout << n - 1 << " ";
    cout << n + 1 << " ";
    cout << n << " ";
  }
}
