#include <bits/stdc++.h>
using namespace std;
const int MAX = 105;
int main() {
  int n;
  cin >> n;
  int i, j, a[MAX];
  for (i = 1; i <= n; i++) cin >> a[i];
  int dp[MAX][3];
  for (i = 0; i <= n; i++)
    for (j = 0; j < 3; j++) dp[i][j] = 0;
  for (i = 1; i <= n; i++) {
    dp[i][0] = max(dp[i - 1][0], max(dp[i - 1][1], dp[i - 1][2]));
    if (a[i] == 1 || a[i] == 3) dp[i][1] = 1 + max(dp[i - 1][0], dp[i - 1][2]);
    if (a[i] == 2 || a[i] == 3) dp[i][2] = 1 + max(dp[i - 1][0], dp[i - 1][1]);
  }
  cout << n - max(dp[n][0], max(dp[n][1], dp[n][2])) << endl;
  return 0;
}
