CSES - Salary Queries
  • Time limit: 1.00 s
  • Memory limit: 512 MB

A company has nn employees with certain salaries. Your task is to keep track of the salaries and process queries.

Input

The first input line contains two integers nn and qq: the number of employees and queries. The employees are numbered 1,2,,n1,2,\ldots,n.

The next line has nn integers p1,p2,,pnp_1,p_2,\ldots,p_n: each employee's salary.

After this, there are qq lines describing the queries. Each line has one of the following forms:

  • ! kk xx: change the salary of employee kk to xx
  • ? aa bb: count the number of employees whose salary is between aba \ldots b

Output

Print the answer to each ? query.

Constraints

  • 1n,q21051 \le n, q \le 2 \cdot 10^5
  • 1pi1091 \le p_i \le 10^9
  • 1kn1 \le k \le n
  • 1x1091 \le x \le 10^9
  • 1ab1091 \le a \le b \le 10^9

Example

Input:

5 3
3 7 2 2 5
? 2 3
! 3 6
? 2 3

Output:

3
2