#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  cout << n << " ";
  if (n == 1) {
    return;
  } else {
    for (long long int i = 1; i <= n - 1; i++) {
      cout << i << " ";
    }
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(10);
  solve();
  return 0;
}
