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