#include <bits/stdc++.h>
int n;
int main() {
  scanf("%d", &n);
  switch (n) {
    case 1:
      printf("2\n");
      break;
    case 2:
      printf("3\n");
      break;
    case 3:
      printf("1\n");
      break;
    case 4:
      printf("2\n");
      break;
    case 5:
      printf("1\n");
      break;
  }
  return 0;
}
