#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  deque<int> d;
  int n;
  cin >> n;
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    d.push_back(i);
  }
  d.pop_back();
  d.push_front(n);
  for (int i = 0; i < d.size(); i++) {
    cout << d[i] << " ";
  }
  cout << endl;
  return 0;
}
