func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 10, mod = 1e9 + 7;   void solve() {     int n;     cin >> n;     int a[n];     for (int i = 0; i < n; ++i) {       cin >> a[i];     }     int ans = 0;     for (int i = 1; i < n; ++i) {       if (a[i] == 3 && a[i - 1] == 1) {         ans += 4;       } else if (a[i] == 1 && a[i - 1] == 3) {         ans += 4;       } else if (a[i] == 2 && a[i - 1] == 1) {         if (i > 1 && a[i - 2] == 3) {           ans += 2;         } else {           ans += 3;         }       } else if (a[i] == 1 && a[i - 1] == 2) {         ans += 3;       } else if (a[i] == 3 && a[i - 1] == 2) {         cout <<  Infinite  << endl;         return;       } else if (a[i] == 2 && a[i - 1] == 3) {         cout <<  Infinite  << endl;         return;       }     }     cout <<  Finite  << endl;     cout << ans << endl;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     int t = 1;     while (t--) solve();     return 0;   }   