func_code_string: #include <bits/stdc++.h>   using namespace std;   int dp[101][2];   int main() {     ios_base::sync_with_stdio(NULL);     cin.tie(NULL);     cout.tie(NULL);     ;     int n;     cin >> n;     vector<int> v(n);     for (int i = 0; i < n; i++) cin >> v[i];     if (v[0] == 1) dp[0][0] = 0, dp[0][1] = 1;     if (v[0] == 2) dp[0][0] = 1, dp[0][1] = 0;     if (v[0] == 3) dp[0][0] = 1, dp[0][1] = 1;     for (int i = 1; i < n; i++) {       if (v[i] == 0) {         dp[i][0] = max(dp[i - 1][0], dp[i - 1][1]);         dp[i][1] = dp[i][0];       }       if (v[i] == 1) {         dp[i][0] = max(dp[i - 1][0], dp[i - 1][1]);         dp[i][1] = dp[i - 1][0] + 1;       }       if (v[i] == 2) {         dp[i][0] = dp[i - 1][1] + 1;         dp[i][1] = max(dp[i - 1][0], dp[i - 1][1]);       }       if (v[i] == 3) {         dp[i][0] = dp[i - 1][1] + 1;         dp[i][1] = dp[i - 1][0] + 1;       }     }     cout << n - max(dp[n - 1][0], dp[n - 1][1]);     return 0;   }   