You are given an array a_1, a_2, …, a_n of integers. This array is non-increasing.

Let's consider a line with n shops. The shops are numbered with integers from 1 to n from left to right. The cost of a meal in the i-th shop is equal to a_i.

You should process q queries of two types:

  * 1 x y: for each shop 1 ≤ i ≤ x set a_{i} = max(a_{i}, y). 
  * 2 x y: let's consider a hungry man with y money. He visits the shops from x-th shop to n-th and if he can buy a meal in the current shop he buys one item of it. Find how many meals he will purchase. The man can buy a meal in the shop i if he has at least a_i money, and after it his money decreases by a_i. 

Input

The first line contains two integers n, q (1 ≤ n, q ≤ 2 ⋅ 10^5).

The second line contains n integers a_{1},a_{2}, …, a_{n} (1 ≤ a_{i} ≤ 10^9) — the costs of the meals. It is guaranteed, that a_1 ≥ a_2 ≥ … ≥ a_n.

Each of the next q lines contains three integers t, x, y (1 ≤ t ≤ 2, 1≤ x ≤ n, 1 ≤ y ≤ 10^9), each describing the next query.

It is guaranteed that there exists at least one query of type 2.

Output

For each query of type 2 output the answer on the new line.

Example

Input


10 6
10 10 10 6 6 5 5 5 3 1
2 3 50
2 4 10
1 3 10
2 2 36
1 4 7
2 2 17


Output


8
3
6
2

Note

In the first query a hungry man will buy meals in all shops from 3 to 10.

In the second query a hungry man will buy meals in shops 4, 9, and 10.

After the third query the array a_1, a_2, …, a_n of costs won't change and will be \{10, 10, 10, 6, 6, 5, 5, 5, 3, 1\}.

In the fourth query a hungry man will buy meals in shops 2, 3, 4, 5, 9, and 10.

After the fifth query the array a of costs will be \{10, 10, 10, 7, 6, 5, 5, 5, 3, 1\}.

In the sixth query a hungry man will buy meals in shops 2 and 4.
1 1
5
2 1 6

1

#include <bits/stdc++.h>
using namespace std;
double getTime() { return clock() / (double)CLOCKS_PER_SEC; };
const int mod = 1e9 + 7;
const long long INF = 3e18;
const int N = 2e5 + 5;
const int P0 = 437;
const int P1 = 343;
const int d = 400;
struct node {
  int mi, ma, gift;
  long long sum;
  node() {
    mi = gift = mod;
    ma = -mod;
    sum = 0;
  }
};
vector<int> a;
int n, q;
vector<node> tree;
void Push(int v, int L, int R) {
  if (tree[v].gift == mod) return;
  int c = (L + R) / 2;
  tree[v * 2].mi = tree[v * 2].ma = tree[v * 2 + 1].mi = tree[v * 2 + 1].ma =
      tree[v].gift;
  tree[v * 2].sum = (long long)(c - L) * tree[v].gift;
  tree[v * 2 + 1].sum = (long long)(R - c) * tree[v].gift;
  tree[v].gift = mod;
}
int F_smaller(int v, int L, int R, int k) {
  if (R - L == 1) return L;
  Push(v, L, R);
  int c = (L + R) / 2;
  if (tree[v * 2].mi > k) {
    if (tree[v * 2 + 1].mi > k) return -1;
    return F_smaller(v * 2 + 1, c, R, k);
  }
  return F_smaller(v * 2, L, c, k);
}
long long Get_sum(int v, int L, int R, int l, int r) {
  if (L == l && R == r) return tree[v].sum;
  Push(v, L, R);
  int c = (L + R) / 2;
  long long an = 0;
  if (l < c) an += Get_sum(v * 2, L, c, l, min(r, c));
  if (c < r) an += Get_sum(v * 2 + 1, c, R, max(l, c), r);
  return an;
}
int F_right(int v, int L, int R, int Le, int k) {
  if (R - L == 1) {
    if (Le > L) return -1;
    if (tree[v].sum > k) return L;
    return L + 1;
  }
  Push(v, L, R);
  int c = (L + R) / 2;
  if (Le >= c) return F_right(v * 2 + 1, c, R, Le, k);
  if (Le > L) {
    long long Sum = Get_sum(1, 0, n, Le, c);
    if (tree[v * 2].sum <= k) return F_right(v * 2 + 1, c, R, Le, k - Sum);
    return F_right(v * 2, L, c, Le, k);
  }
  if (tree[v * 2].sum <= k)
    return F_right(v * 2 + 1, c, R, Le, k - tree[v * 2].sum);
  return F_right(v * 2, L, c, Le, k);
}
void Upd(int v, int L, int R, int l, int r, int nmax) {
  if (L == l && R == r) {
    tree[v].mi = tree[v].ma = tree[v].gift = nmax;
    tree[v].sum = (long long)(R - L) * nmax;
    return;
  }
  Push(v, L, R);
  int c = (L + R) / 2;
  if (l < c) Upd(v * 2, L, c, l, min(r, c), nmax);
  if (c < r) Upd(v * 2 + 1, c, R, max(l, c), r, nmax);
  tree[v].sum = tree[v * 2].sum + tree[v * 2 + 1].sum;
  tree[v].mi = tree[v * 2 + 1].mi;
  tree[v].ma = tree[v * 2].ma;
}
void Update(int x, int nmax) {
  int pos = F_smaller(1, 0, n, nmax);
  if (pos == -1 || pos > x) return;
  Upd(1, 0, n, pos, x + 1, nmax);
}
void solve() {
  cin >> n >> q;
  a.resize(n);
  tree.resize(n * 4);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  for (int i = (n)-1; i >= 0; i--) Upd(1, 0, n, i, i + 1, a[i]);
  for (int i = 0; i < (q); i++) {
    long long t, x, y;
    cin >> t >> x >> y;
    x--;
    if (t == 1)
      Update(x, y);
    else {
      int cnt = 0;
      while (true) {
        long long pos = F_smaller(1, 0, n, y);
        if (pos == -1) break;
        pos = max(pos, x);
        int R = F_right(1, 0, n, pos, y);
        cnt += R - pos;
        y -= Get_sum(1, 0, n, pos, R);
        pos = R;
        if (pos == n) break;
      }
      cout << cnt << '\n';
    }
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int qq = 1;
  while (qq--) solve();
}
