#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
int main() {
  int n;
  cin >> n;
  cout << n + n / 2 << endl;
  if (n % 2 == 1) {
    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 << ' ';
    }
  } else {
    vector<int> v;
    for (int i = 3; i <= n; i += 2) {
      cout << i << ' ';
      v.push_back(i);
    }
    for (int i = 2; i <= n; i += 2) {
      cout << i << ' ';
      v.push_back(i);
    }
    cout << 1 << ' ';
    v.push_back(1);
    int k = n / 2;
    int j = 0;
    while (k--) {
      cout << v[j] << ' ';
      j++;
      j %= v.size();
    }
  }
  return 0;
}
