#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (int x = 0; x < n; x++) {
    a[x] = x + 1;
  }
  for (int x = n - 1; x > 0; x--) {
    swap(a[x - 1], a[x]);
  }
  for (int x = 0; x < n; x++) {
    cout << a[x] << " ";
  }
}
