#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); ll n; cin >> n; if(n == 2){ cout << "INF" << endl; return 0; } if(n == 3 || n == 4)return 1; cout << max(2ll, 9 - n) << endl; }