#include <bits/stdc++.h>
using namespace std;
long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
const long long maxn = 2e5 + 10;
int32_t main() {
  long long n = in();
  if (n == 1) {
    cout << 2 << endl;
  } else if (n == 2) {
    cout << 3 << endl;
  } else if (n == 3) {
    cout << 1 << endl;
  } else if (n == 4) {
    cout << 2 << endl;
  } else {
    cout << 1 << endl;
  }
}
