#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
void fun(long long n) {
  if (n == 0) return;
  swap(v[n - 1], v[n]);
  fun(n - 1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    v.push_back(i + 1);
  }
  fun(n - 1);
  for (long long i = 0; i < n; i++) {
    cout << v[i] << " ";
  }
  cout << endl;
  return 0;
}
