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