#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void bolt() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long dp[101][3];
int32_t main() {
  bolt();
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    dp[i][0] = max({dp[i - 1][0], dp[i - 1][1], dp[i - 1][2]});
    if (x == 1 or x == 3) {
      dp[i][1] = max(dp[i - 1][0] + 1, dp[i - 1][2] + 1);
    }
    if (x == 2 or x == 3) {
      dp[i][2] = max(dp[i - 1][0] + 1, dp[i - 1][1] + 1);
    }
  }
  cout << n - max({dp[n][0], dp[n][1], dp[n][2]});
  return 0;
}
