#include using namespace std; int main() { int N; int iAns; cin >> N; iAns = 1; if( N == 1 ) cout << 7 << endl; else if( N == 2 ) cout << iAns << endl; else if( N == 3 ) cout << iAns << endl; else if( N == 4 ) cout << 0 << endl; else if( N == 5 ) cout << 5 << endl; else if( N == 6 ) cout << iAns << endl; else if( N == 7 ) cout << iAns << endl; else if( N == 8 ) cout << iAns << endl; else if( N == 9 ) cout << iAns << endl; else if( N == 10 ) cout << iAns << endl; return 0; }