#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  bool first = true;
  for (int i = 2; i <= n; i++)
    if (first) {
      printf("%d", i);
      first = false;
    } else
      printf(" %d", i);
  if (first)
    printf("1\n");
  else
    printf(" 1\n");
  return 0;
}
