#include <bits/stdc++.h>
using namespace std;
int n;
void f(vector<int>& a, int x) {
  if (x == 0) return;
  f(a, x - 1);
  swap(a[x], a[x - 1]);
}
int main() {
  cin >> n;
  vector<int> res(n);
  for (int i = 0; i < n - 1; ++i) res[i] = i + 1;
  res.insert(res.begin(), n);
  for (int i = 0; i < n; ++i) cout << res[i] << " ";
  cout << endl;
  return 0;
};
