JOI-kun has N fishes, numbered from 1 to N. The size of the fish i (1≤i≤N) is A_i.
When we grow fish, we have to pay attention to the following fact: if we have two nearby fishes, one fish eats the other fish as time passes. Here, two fishes are nearby if there is no fish between them. More precisely, if the size of the fish x is larger than or equal to the size of the fish y, and the fish x and the fish y are nearby, then the fish x eats the fish y, and the size of x becomes the sum of the original size of x and the size of y. If the fish x and the fish y have the same size, any one of them may eat the other.
JOI-kun will grow fishes for Q days. To kill time, he does the following thought experiment. On the j-th day (1≤j≤Q), JOI-kun takes one of the following actions.
Write a program which, given information of JOI-kun’s fishes and JOI-kun’s plan, calculates the number of possible indices of surviving fishes for each action of Type 2 in order to determine whether JOI-kun’s thought is correct or not. Note that this is just a thought experiment. Please be assured that no fishes are eaten actually.
Read the following data from the standard input. Given values are all integers.
\begin{align\*}& N \\\ & A\_1 \\, A\_2 \\, \cdots \\, A\_N \\\ & Q \\\ & \text{(Query }1\text{)} \\\ & \text{(Query }2\text{)} \\\ & \vdots \\\ & \text{(Query }Q\text{)} \end{align\*}
Each (Query j) (1≤j≤Q) consists of space separated integers. Let T_j be the first integer of (Query j). The content of this line is one of the following.
For each action of Type 2 (i.e., for each j (1≤j≤Q) with T_j=2), in order, write the number of possible indices of surviving fishes to the standard output. The outputs should be separated by line breaks.