#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long N = 1e6 + 5;
const long long INF = 10000000000000;
const long long mod = 1e9 + 7;
long long maxd(long long x, long long y) {
  if (x > y) {
    return x;
  } else {
    return y;
  }
}
long long mind(long long x, long long y) {
  if (x < y) {
    return x;
  } else {
    return y;
  }
}
long long poww(long long a, long long b) {
  if (b < 0 || a <= 0) return 0;
  long long ans = 1LL;
  while (b) {
    if (b & 1) (ans = ans * a);
    a = a * a;
    b >>= 1;
  }
  return ans;
}
long long binpoww(long long a, long long b, long long m) {
  if (b < 0 || a <= 0) return 0;
  long long ans = 1LL;
  while (b) {
    if (b & 1) (ans = ans * a) %= m;
    a = a * a;
    a %= m;
    b >>= 1;
  }
  return ans;
}
long long modinv(long long a, long long m) { return binpoww(a, m - 2, m); }
long long gcd(long long a, long long b) {
  if (!a || !b) return a | b;
  unsigned shift = __builtin_ctz(a | b);
  a >>= __builtin_ctz(a);
  do {
    b >>= __builtin_ctz(b);
    if (a > b) swap(a, b);
    b -= a;
  } while (b);
  return a << shift;
}
long long getSum(long long num) {
  long long sum = 0;
  while (num != 0) {
    sum = sum + num % 10;
    num = num / 10;
  }
  return sum;
}
long long isPrime(long long num) {
  if (num <= 1) return 0;
  for (long long i = 2; i * i <= num; i++) {
    if (num % i == 0) {
      return 0;
    }
  }
  return 1;
}
int retMaxDig(int num) {
  string s = to_string(num);
  int max = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] - '0' > max) max = s[i] - '0';
  }
  return max;
}
long long decimalToBinary(long long num) {
  long long B_Number = 0;
  long long cnt = 0;
  while (num != 0) {
    long long rem = num % 2;
    long long c = poww(10, cnt);
    B_Number += rem * c;
    num /= 2;
    cnt++;
  }
  return B_Number;
}
long long binomialCoeff(long long n, long long k) {
  long long res = 1;
  if (n < k) {
    res = 0;
    return res;
  }
  if (k > n - k) k = n - k;
  for (long long i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
bool isPalindrome(string str) {
  long long num = str.size();
  for (long long i = 0; i <= (num - 1) / 2; i++) {
    if (str[i] != str[num - i - 1]) {
      return 0;
    }
  }
  return 1;
}
long long factorial(long long n) {
  if (n == 0) return 1;
  long long i = n, fact = 1;
  while (n / i != n) {
    fact = fact * i;
    i--;
  }
  return fact;
}
long long lcm(long long a, long long b) { return ((a / gcd(a, b)) * b); }
long long begtime = clock();
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    v.push_back(i + 1);
  }
  for (long long i = 1; i <= n - 2; i += 2) {
    swap(v[i], v[i + 1]);
  }
  if (n % 2 == 0) {
    swap(v[0], v[n - 1]);
  }
  for (long long i = 0; i < n; i++) {
    cout << v[i] << " ";
  }
  return 0;
}
