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