#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 10;
void input() {
  int n;
  cin >> n;
  vector<int> ans(n);
  ans[0] = n;
  for (int i = 1; i < n; ++i) {
    ans[i] = i;
  }
  for (int i = 0; i < n; ++i) cout << ans[i] << " ";
  cout << endl;
}
int main() {
  input();
  return 0;
}
