#include "bits/stdc++.h" using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = (ll)1e9 + 7; signed main() { ios::sync_with_stdio(false); cin.tie(0); ll N; cin >> N; if (N == 2)cout << "INF" << endl; else if (N == 3 || N == 4)cout << 6 << endl; else if (N == 5 || N == 6)cout << 4 << endl; else cout << 2 << endl; return 0; }