#include <bits/stdc++.h>
int swap(int *a, int *b) {
  int temp = *a;
  *a = *b;
  *b = temp;
}
int main() {
  int n;
  scanf("%d", &n);
  int ar[n];
  for (int i = 0; i < n; i++) ar[i] = i + 1;
  for (int i = n - 1; i > 0; i--) swap(&ar[i], &ar[i - 1]);
  for (int i = 0; i < n; i++) printf("%d ", ar[i]);
  return 0;
}
