#include <bits/stdc++.h>
using namespace std;
long n;
int main() {
  cin >> n;
  if (n == 3)
    cout << 1;
  else if (n == 1)
    cout << 2;
  else if (n == 4)
    cout << 2;
  else if (n == 2)
    cout << 3;
  else
    cout << 1;
}
