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.
#include <bits/stdc++.h>
using namespace std;
int n, q;
int p[200005];
struct node {
  int l, r;
  long long sum;
  int Min, Max;
  long long lazy;
} tree[200005 * 4];
void pushup(node& k, node& l, node& r) {
  k.sum = l.sum + r.sum;
  k.Min = min(l.Min, r.Min);
  k.Max = max(l.Max, r.Max);
}
void pushup(int x) { pushup(tree[x], tree[x << 1], tree[x << 1 | 1]); }
void build(int l, int r, int x = 1) {
  if (l == r) {
    tree[x] = {l, r, p[l], p[l], p[l], 0};
    return;
  }
  tree[x] = {l, r, 0, 0, 0, 0};
  int mid = (l + r) >> 1;
  build(l, mid, x << 1);
  build(mid + 1, r, x << 1 | 1);
  tree[x].sum = tree[x * 2].sum + tree[x * 2 + 1].sum;
  tree[x].Max = max(tree[x * 2].Max, tree[x * 2 + 1].Max);
  tree[x].Min = min(tree[x * 2].Min, tree[x * 2 + 1].Min);
}
void pushdown(node& op, long long lazy) {
  op.sum = lazy * (op.r - op.l + 1);
  op.Min = lazy;
  op.Max = lazy;
  op.lazy = lazy;
}
void pushdown(int x) {
  if (!tree[x].lazy) return;
  pushdown(tree[x << 1], tree[x].lazy);
  pushdown(tree[x << 1 | 1], tree[x].lazy);
  tree[x].lazy = 0;
}
int check(int l, int r, int& have, int x = 1) {
  if (l <= tree[x].l && r >= tree[x].r) {
    if (have < tree[x].Min) return 0;
    if (have >= tree[x].sum) {
      have -= tree[x].sum;
      return tree[x].r - tree[x].l + 1;
    }
    if (tree[x].l == tree[x].r) return 0;
  }
  pushdown(x);
  int mid = tree[x].l + tree[x].r >> 1;
  int res = 0;
  if (l <= mid) res += check(l, r, have, x << 1);
  if (r > mid) res += check(l, r, have, x << 1 | 1);
  return res;
}
void judge(int l, int r, int c, int x = 1) {
  if (l <= tree[x].l && r >= tree[x].r) {
    if (tree[x].Min >= c) return;
    if (tree[x].Max < c) {
      pushdown(tree[x], c);
      return;
    }
  }
  pushdown(x);
  int mid = tree[x].l + tree[x].r >> 1;
  if (l <= mid) judge(l, r, c, x << 1);
  if (r > mid) judge(l, r, c, x << 1 | 1);
  pushup(x);
}
int main() {
  cin >> n >> q;
  for (int i = 1; i <= n; i++) cin >> p[i];
  build(1, n);
  for (int i = 1; i <= q; i++) {
    int t, x, y;
    cin >> t >> x >> y;
    if (t == 1)
      judge(1, x, y);
    else
      cout << check(x, n, y) << endl;
  }
  return 0;
}
