EasyRating 1000
Taxis for Groups
Groups of 1 to 4 friends want taxis. A taxi holds 4, and a group must ride together (several groups may share). Print the fewest taxis.
Input
n, then n group sizes.
Output
The number of taxis.
Sample 1
Input
5 1 2 4 3 3
Output
4
Sample 2
Input
8 2 3 4 4 2 1 3 1
Output
5
Output appears here