#include <bits/stdc++.h>
using namespace std;
int in[105], dp[105][3], n;
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d", in + i);
  if (in[1] & 1) dp[1][1] = 1;
  if (in[1] & 2) dp[1][2] = 1;
  for (i = 2; i <= n; ++i) {
    dp[i][0] = max(dp[i - 1][0], max(dp[i - 1][1], dp[i - 1][2]));
    if (in[i] & 1)
      dp[i][1] = 1 + max(dp[i - 1][2], dp[i - 1][0]);
    else
      dp[i][1] = 0;
    if (in[i] & 2)
      dp[i][2] = 1 + max(dp[i - 1][1], dp[i - 1][0]);
    else
      dp[i][2] = 0;
  }
  printf("%d\n", n - max(dp[n][0], max(dp[n][1], dp[n][2])));
  return 0;
}
