#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%i", &n);
  if (n == 3)
    printf("1");
  else if (n == 1)
    printf("2");
  else if (n == 4)
    printf("2");
  else if (n == 2)
    printf("3");
  else if (n == 5)
    printf("1");
}
