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