#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  cout << n << " ";
  for (int i = 0; i < n - 2; i++) {
    cout << i + 1 << " ";
  }
  if (n > 1) cout << n - 1 << "\n";
  return 0;
}
