#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long m) {
  if (y == 0) return 1;
  long long p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
const int N = 1e6 + 1;
long long prime[N];
vector<long long> p;
vector<int> ans;
void sv() {
  for (int i = 1; i < N; i++) prime[i] = 1;
  for (int i = 2; i * i <= N; i++) {
    if (prime[i]) {
      for (int j = i * i; j < N; j += i) {
        prime[j] = 0;
      }
    }
  }
  for (int i = 2; i < N; i++) {
    if (prime[i]) p.push_back(i);
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, i;
  cin >> n;
  long long a[n + 1];
  a[n] = 1;
  long long c = 2;
  for (i = 1; i < n; i++) {
    a[i] = c++;
  }
  for (i = 1; i <= n; i++) {
    cout << a[i] << " ";
  }
  cout << '\n';
}
