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