#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; #define bit(n,k) ((n>>k)&1) int main(){ cin.tie(0); ios::sync_with_stdio(0); ll N; cin >> N; if(N == 2){ cout << "INF" << endl; return 0; } if(N == 3 || N == 4){ cout << 6 << endl; return 0; } if(N == 5 || N == 6){ cout << 4 << endl; return 0; } cout << 2 << endl; }