#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const int INF = (int)1e9;
int main(int argc, const char *argv[]) {
  int a;
  scanf("%d", &a);
  if (a == 3)
    printf("1");
  else if (a == 1)
    printf("2");
  else if (a == 4)
    printf("2");
  else if (a == 2)
    printf("3");
  else
    printf("1");
  return 0;
}
