Operation "T" on array "a" with length at m has following description:
T i k, which holds $1 \le i < m$, i,k are both integers,denotes that $a_i+=1*(-1)^k,a_{i+1}+=4*(-1)^k,..,a_{i+j}+=(j+1)^2*(-1)^k,...,a_{m}+=(m-i+1)^2*(-1)^k$.
A array $a$ with length $n$ is "acid" if and only if :
1. If we add $5$ zero elements at the end of $a$ (length is $n + 5$ now).
2. After 1, we can use finite operation "T" on a to make a become all zero array.
The "acidity" of a array "a" is the number of nonempty subintervals which is "acid".
(more formally, the number of pairs (l,r) satisfying $a_{l},a_{l+1}...a_{r}$ is "acid",$1 \le l \le r \le length(a)$)
Now,you are given an integer $n$ and an array "a" consisting $n$ integers.You should maintain the "acidity" of the array dynamicly.
Given an integer m, following m operations like that:
U i x, denoting $a_i+=x,a_{i+1}+=x,1 \le i < n.$
You should output an answer before all operations,
Then print one more answer after each operation denoting the dynamic "acidity".
Yes, as the writer is too lazy, we didn't encrypt the input data in any way, help yourself if you can solve this problem by some off line way :)