#include <bits/stdc++.h>
using namespace std;
int abk(int a) { return a < 0 ? -1 * a : a; }
int n, a[11111];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) a[i] = i;
  for (int i = n; i > 1; i--) swap(a[i], a[i - 1]);
  for (int i = 1; i <= n; i++) cout << a[i] << ' ';
}
