#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const double err = 1e-12;
const double PI = 3.141592653589793;
const int N = 1e5 + 5;
int n;
vector<int> res;
void solve() {
  cin >> n;
  if (n & 1) {
    cout << 1 << ' ';
    n--;
    for (int i = 2; i <= n; i += 2) cout << i + 1 << ' ' << i << ' ';
    cout << endl;
  } else {
    cout << n << ' ';
    n--;
    for (int i = 2; i <= (n - 1); i += 2) cout << i + 1 << ' ' << i << ' ';
    cout << 1 << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
