#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 50;
const int INF = 1 << 30;
int n;
int a[MAXN];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) a[i] = i;
  for (int i = n; i >= 2; --i) {
    swap(a[i], a[i - 1]);
  }
  for (int i = 1; i <= n; ++i) cout << a[i] << (i == n ? '\n' : ' ');
  return 0;
}
