You have $$$n$$$ stone statues, each with a nose. The statues can face $$$4$$$ directions: front, right, back, or left.
Each time you can either:
What is the minimum number of presses needed to make all statues face front?
The first line contains an integer $$$n$$$ ($$$1\leq n\leq 10^6$$$).
The next line contains $$$n$$$ space-separated integers $$$a_i$$$ ($$$a_i\in\{0,1,2,3\}$$$) representing directions, $$$a_i=0,1,2,3$$$ correspond to front, right, back, left respectively.
A single integer representing the answer.
40 1 2 3
6
| Name |
|---|


