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