#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, i, j, k, x, y, z;
  cin >> n;
  if (n % 2 == 1) {
    cout << 1 << " ";
    for (i = 2; i <= n; i += 2) {
      cout << i + 1 << " " << i << " ";
    }
  } else {
    cout << n << " ";
    for (i = 2; i < n; i += 2) {
      cout << i + 1 << " " << i << " ";
    }
    cout << 1;
  }
  return 0;
}
