#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0;
  while (cin >> n) {
    if (n == 3) cout << 1 << endl;
    if (n == 1) cout << 2 << endl;
    if (n == 4) cout << 2 << endl;
    if (n == 2) cout << 3 << endl;
    if (n == 5) cout << 1 << endl;
  }
  return 0;
}
