#include <bits/stdc++.h>
using namespace std;
int n, x, dp[102][3];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    dp[i][0] = *max_element(dp[i - 1], dp[i - 1] + 3);
    if (x == 1 || x == 3) dp[i][1] = max(dp[i - 1][0], dp[i - 1][2]) + 1;
    if (x == 2 || x == 3) dp[i][2] = max(dp[i - 1][0], dp[i - 1][1]) + 1;
  }
  cout << n - *max_element(dp[n], dp[n] + 3);
  return 0;
}
