#include <bits/stdc++.h>
using namespace std;
int main() {
  int i;
  cin >> i;
  switch (i) {
    case 1:
      cout << 2;
      break;
    case 2:
      cout << 3;
      break;
    case 3:
      cout << 1;
      break;
    case 4:
      cout << 2;
      break;
    case 5:
      cout << 1;
      break;
  }
}
