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