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