#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  scanf("%d\n", &n);
  if (n == 1) printf("2\n");
  if (n == 2) printf("3\n");
  if (n == 3) printf("1\n");
  if (n == 4) printf("2\n");
  if (n == 5) printf("1\n");
  return 0;
}
