#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9;
const long long inf64 = 1e18;
const long long MOD = inf + 7;
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  ;
  long long n;
  cin >> n;
  long long a[n + 5];
  for (long long i = 1; i <= n; i++) a[i] = i;
  for (long long i = 1; i <= n - n % 2; i += 2) swap(a[i], a[i + 1]);
  if (n % 2 == 1 && n >= 2) {
    swap(a[n], a[2]);
  }
  for (long long i = 1; i <= n; i++) cout << a[i] << " ";
}
