#include using namespace std; int main(){ long long N; cin >> N; if (N == 2){ cout << "INF" << endl; } else if (N == 3){ cout << 6 << endl; } else if (N == 4){ cout << 5 << endl; } else if (N <= 6){ cout << 4 << endl; } else { cout << 3 << endl; } }