#include <bits/stdc++.h>
using namespace std;
int n, dp[105][10];
int s[105];
void DP() {
  memset(dp, -1, sizeof(dp));
  dp[0][0] = 0;
  for (int i = 0; i < n; i++) {
    for (int st = 0; st < 3; st++) {
      if (dp[i][st] == -1) continue;
      for (int j = 0; j < 3; j++) {
        if (j & st) continue;
        if (!(j & s[i + 1]) && j != 0) continue;
        int tt = 1;
        if (j == 0) tt = 0;
        if (dp[i + 1][j] == -1 || dp[i + 1][j] < dp[i][st] + tt)
          dp[i + 1][j] = dp[i][st] + tt;
      }
    }
  }
  int tmp = -1;
  for (int i = 0; i < 3; i++) {
    if (dp[n][i] != -1 && dp[n][i] > tmp) tmp = dp[n][i];
  }
  int res = n - tmp;
  printf("%d\n", res);
}
int main() {
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) scanf("%d", &s[i]);
    DP();
  }
  return 0;
}
