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