#include using namespace std; signed main() { int n; cin >> n; if (n == 1) { cout << 7 << endl; } else if (n == 5) { cout << 5 << endl; } else if (n == 4) { cout << 2 << endl; } else if (n == 2) { cout << 3 << endl; } else { cout << 4 << endl; } return 0; }