#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[1001];
  int c;
  int f;
  cin >> c;
  f = c;
  for (int i = 0; i < c; i++) {
    arr[i] = i + 1;
  }
  while (c) {
    if (c == 1) {
      break;
    } else {
      int a;
      a = arr[c - 1];
      arr[c - 1] = arr[c - 2];
      arr[c - 2] = a;
      c--;
    }
  }
  for (int i = 0; i < f; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
  return 0;
}
