func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, a[1000];     cin >> n;     for (int i = 0; i < n; i++) {       cin >> a[i];     }     long int answer = 0;     for (int i = 0; i < (n - 1); i++) {       if (a[i] == 1 && a[i + 1] == 2) {         answer += 3;       } else if (a[i] == 1 && a[i + 1] == 3) {         answer += 4;       } else if (a[i] == 2 && a[i + 1] == 1) {         answer += 3;       } else if (a[i] == 2 && a[i + 1] == 3) {         cout <<  Infinite ;         return 0;       } else if (a[i] == 3 && a[i + 1] == 1) {         answer += 4;         if (i < n - 2 && a[i + 2] == 2) {           answer -= 1;         }       } else if (a[i] == 3 && a[i + 1] == 2) {         cout <<  Infinite ;         return 0;       }     }     cout <<  Finite  << endl;     cout << answer;     return 0;   }   