#include <bits/stdc++.h>
#pragma GCC target("sse4.2")
using namespace std;
long long dp[105][3] = {0};
void grayserge() {
  long long n;
  cin >> n;
  long long x;
  for (long long i = 1; i <= n; i++) {
    cin >> x;
    dp[i][0] = max(dp[i - 1][0], max(dp[i - 1][1], dp[i - 1][2]));
    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(dp[n][0], max(dp[n][1], dp[n][2]));
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    grayserge();
  }
  cerr << "time taken: " << (float)clock() / CLOCKS_PER_SEC << endl;
  return 0;
}
