#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int n, tot;
int ans[500010];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  if (n % 2 == 0) {
    for (int i = 1; i <= n; i += 2) {
      ans[++tot] = i;
    }
    for (int i = 2; i <= n; i += 2) {
      ans[++tot] = i;
    }
    for (int i = 1; i <= n; i += 2) {
      ans[++tot] = i;
    }
  } else {
    for (int i = 2; i <= n; i += 2) {
      ans[++tot] = i;
    }
    for (int i = 1; i <= n; i += 2) {
      ans[++tot] = i;
    }
    for (int i = 2; i <= n; i += 2) {
      ans[++tot] = i;
    }
  }
  cout << tot << "\n";
  for (int i = 1; i <= tot; ++i) cout << ans[i] << " ";
  return 0;
}
