#include <bits/stdc++.h>
using namespace std;
const int N = INT_MAX;
long long a, b, c, d, n, j, i, k, l, m;
map<int, int> mp;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n == 2) return cout << 2 << " " << 1, 0;
  if (n % 2 == 1) {
    cout << 1 << " ";
    for (i = 2; i <= n; i++) {
      if (i % 2 == 0)
        cout << i + 1 << " ";
      else
        cout << i - 1 << " ";
    }
  } else {
    cout << n << " " << 1 << " ";
    for (i = 2; i < n; i++) cout << i << " ";
  }
}
