Spadework 2020. 2. 10. 17:26

* Solved 기준 브론즈3 단순 풀이

input();s,t=0,0
for i in map(int, input().split()):
	if(i==t): s+=1; t=(t+1)%3
print(s)