#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long N = 100000;
template <typename A, typename B, typename C>
class trio {
 public:
  A first;
  B second;
  C third;
  trio(A a, B b, C c) {
    this->first = a;
    this->second = b;
    this->third = c;
  }
  trio() {
    this->first = 0;
    this->second = 0;
    this->third = 0;
  }
};
template <typename A, typename B, typename C>
ostream &operator<<(ostream &os, const trio<A, B, C> &p) {
  return os << "(" << p.first << ", " << p.second << ", " << p.third << ")";
}
template <typename third>
ostream &operator<<(ostream &os, const vector<third> &v) {
  os << "{";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename first, typename second>
ostream &operator<<(ostream &os, const pair<first, second> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename third>
ostream &operator<<(ostream &os, const set<third> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename third>
ostream &operator<<(ostream &os, const multiset<third> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename first, typename second>
ostream &operator<<(ostream &os, const map<first, second> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << it->first << " = " << it->second;
  }
  return os << "]";
}
vector<vector<long long> > allans;
vector<long long> res;
void bf(vector<vector<long long> > grid, vector<long long> &ans) {
  long long n = grid.size();
  bool found = 0;
  for (long long i = 0; i < grid.size(); i++) {
    if (grid[i].size() == 0) continue;
    found = 1;
    vector<long long> temp = grid[i];
    long long cnt1 = count(grid[i].begin(), grid[i].end(), 1);
    long long cnt0 = count(grid[i].begin(), grid[i].end(), 0);
    grid[i].clear();
    long long left = cnt1 / 2;
    long long right = cnt1 - left;
    if (i == 0) {
      for (long long j = 0; j < cnt1; j++) {
        grid[i + 1].push_back(0);
      }
      ans.push_back(i);
      bf(grid, ans);
      ans.pop_back();
      for (long long j = 0; j < cnt1; j++) {
        grid[i + 1].pop_back();
      }
    } else if (i == n - 1) {
      for (long long j = 0; j < cnt1; j++) {
        grid[i - 1].push_back(0);
      }
      ans.push_back(i);
      bf(grid, ans);
      ans.pop_back();
      for (long long j = 0; j < cnt1; j++) {
        grid[i - 1].pop_back();
      }
    } else {
      for (long long j = 0; j < left; j++) {
        grid[i - 1].push_back(0);
      }
      for (long long j = 0; j < right; j++) {
        grid[i + 1].push_back(0);
      }
      ans.push_back(i);
      bf(grid, ans);
      ans.pop_back();
      for (long long j = 0; j < left; j++) {
        grid[i - 1].pop_back();
      }
      for (long long j = 0; j < right; j++) {
        grid[i + 1].pop_back();
      }
    }
    grid[i] = temp;
  }
  if (!found) {
    if (ans.size() < res.size()) {
      res = ans;
      allans.clear();
      allans.push_back(ans);
    } else if (ans.size() == res.size()) {
      allans.push_back(ans);
    }
  }
}
void slow() {
  long long n;
  cin >> n;
  vector<vector<long long> > grid;
  for (long long i = 0; i < n; i++) {
    grid.push_back({1, 1});
  }
  vector<long long> ans;
  for (long long i = 0; i < 3 * n; i++) {
    res.push_back(1);
  }
  bf(grid, ans);
  for (long long i = 0; i < allans.size(); i++) {
    for (long long j = 0; j < allans[i].size(); j++) allans[i][j]++;
  }
  for (long long i = 0; i < allans.size(); i++) {
    if (allans[i][0] == allans[i][allans[i].size() - 1])
      for (auto t : allans[i]) cout << t << " ";
    cout << '\n';
  }
}
void fast() {
  vector<long long> res;
  long long n;
  cin >> n;
  vector<long long> even;
  vector<long long> odd;
  for (long long i = 1; i <= n; i++) {
    if (i & 1) {
      odd.push_back(i);
    } else {
      even.push_back(i);
    }
  }
  sort(even.begin(), even.end());
  sort(odd.begin(), odd.end());
  cout << even.size() + odd.size() + even.size() << "\n";
  for (auto t : even) cout << t << " ";
  for (auto t : odd) cout << t << " ";
  sort(even.begin(), even.end(), greater<long long>());
  for (auto t : even) cout << t << " ";
  cout << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  fast();
  return 0;
}
