Gary likes to solve algorithmic problems but he doesn't like problems that involve queries. His school teacher gave him an assignment full of problems but one of them involve queries. Can you help Gary in solving that problem so that he can go and play with his friends? The problem is :
Given an Array A consisting of N positive integers, you have to answer Q queries on it. Queries can be of the two types:
- \(1\; X\; Y\) - Update the value of the Xth element in the array to Y.
- \(2\; X\) - Print the value of \(\sum_{i=1}^{n} \left \lfloor{\frac{A_i}{X}}\right \rfloor\) where \(\left \lfloor{}\right \rfloor\) denotes Greatest Integer Function.
Input:
The first line contains two space separated integers N and Q.
Next line contains N space separated integers denoting array A.
Next Q lines contain queries of one of the above mentioned type format.
Output:
Answer to the each query of type 2 in a new line .
Constraints:
\(1 \le N \le 5 * 10^5\)
\(1 \le Q \le 5 * 10^5\)
\(1 \le A_i, X, Y \le 5 * 10^5\)