#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) return gcd(b, a);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
bool isprime(int a) {
  if (a == 1)
    return false;
  else {
    int i = 2;
    while (i * i <= a) {
      if (a % i == 0) return false;
      i++;
    }
    return true;
  }
}
int main() {
  int a;
  cin >> a;
  if (a == 3) cout << 1 << endl;
  if (a == 1) cout << 2 << endl;
  if (a == 4) cout << 2 << endl;
  if (a == 2) cout << 3 << endl;
  if (a == 5) cout << 1 << endl;
  return 0;
}
