#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
int di[] = {1, -1, 0, 0};
int dj[] = {0, 0, 1, -1};
void file() {}
int arr[101], n, memo[100][2][2];
int solve(int ind, int write, int sport) {
  if (ind == n) return 0;
  int &ret = memo[ind][write][sport];
  int res2 = 0, res1 = 0, res3 = 0, res4 = 0;
  if (ret != -1)
    return ret;
  else {
    if (arr[ind] == 3 && !write && !sport) {
      res1 = solve(ind + 1, 1, 0) + 1;
      res2 = solve(ind + 1, 0, 1) + 1;
    } else if ((arr[ind] == 1 && !write) || (arr[ind] == 3 && !write)) {
      res3 = solve(ind + 1, 1, 0) + 1;
    } else if ((arr[ind] == 2 && !sport) || (arr[ind] == 3 && !sport))
      res4 = solve(ind + 1, 0, 1) + 1;
    else
      res2 = solve(ind + 1, 0, 0);
    return ret = max(max(max(res1, res2), res3), res4);
  }
}
int main() {
  file();
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  memset(memo, -1, sizeof memo);
  int x = solve(0, 0, 0);
  int ans = n - x;
  printf("%d", ans);
}
