#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ara[n + 5];
  int i, j;
  for (j = 1; j <= n; j++) ara[j + 1] = j;
  ara[1] = j - 1;
  for (i = 1; i <= n; i++) {
    cout << ara[i] << " ";
  }
}
