In Nanjing, a great many students cheat at Mathematics Olympiad contest. Some of them stole the problems. What is worse, some others, like K.W., could even modify the answer sheet to enlarge his scoring. Even though, he is waiting for your help to solve such a complex puzzle, for he cannot solve it himself.
There are four kinds of arcs on the plane: (4 denotes a full circle, 3 denotes ¾ a circle, 2 denotes half a circle, 1 denotes ¼ a circle)
All of the arcs are facing leftwards (as the picture above, one should not rotate them). You are given N <= 1000 arcs on the plane, how many regions are formed out by them (several close regions including the outmost open region)? See the following example:
Eight regions are formed out with six arcs.