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;
class segment_tree {
  int n;
  vector<long long> mx;
  vector<long long> mn;
  vector<long long> sm;
  vector<long long> mod;
  void push(int v, int L, int R) {
    if (mod[v] == 0) return;
    sm[v] = mod[v] * (R - L);
    mx[v] = mod[v];
    mn[v] = mod[v];
    mod[2 * v + 1] = mod[v];
    mod[2 * v + 2] = mod[v];
    mod[v] = 0;
  }
  long long get_sum(int v, int L, int R) {
    if (mod[v] == 0) return sm[v];
    return mod[v] * (R - L);
  }
  long long get_mx(int v) {
    if (mod[v] == 0) return mx[v];
    return mod[v];
  }
  long long get_mn(int v) {
    if (mod[v] == 0) return mn[v];
    return mod[v];
  }
  void set(int v, int L, int R, int l, int r, long long x) {
    if (R <= l || r <= L) return;
    if (l <= L && R <= r) {
      mod[v] = x;
      sm[v] = x * (R - L);
      mx[v] = x;
      mn[v] = x;
    } else {
      push(v, L, R);
      set(2 * v + 1, L, (L + R) / 2, l, r, x);
      set(2 * v + 2, (L + R) / 2, R, l, r, x);
      sm[v] = get_sum(2 * v + 1, L, (L + R) / 2) +
              get_sum(2 * v + 2, (L + R) / 2, R);
      mx[v] = max(get_mx(2 * v + 1), get_mx(2 * v + 2));
    }
  }
  int first_mx_less(int v, int L, int R, int r, long long x) {
    if (r <= L) return n;
    if (R <= r) {
      if (get_mx(v) >= x) return n;
      if (L == R - 1) return L;
      push(v, L, R);
      if (get_mx(2 * v + 2) >= x)
        return first_mx_less(2 * v + 2, (L + R) / 2, R, r, x);
      else
        return first_mx_less(2 * v + 1, L, (L + R) / 2, r, x);
    }
    push(v, L, R);
    int a = first_mx_less(2 * v + 2, (L + R) / 2, R, r, x);
    if (a < n) return a;
    return first_mx_less(2 * v + 1, L, (L + R) / 2, r, x);
  }
  long long get_sum(int v, int L, int R, int l, int r) {
    if (R <= l || r <= L)
      return 0;
    else if (l <= L && R <= r)
      return get_sum(v, L, R);
    push(v, L, R);
    return get_sum(2 * v + 1, L, (L + R) / 2, l, r) +
           get_sum(2 * v + 2, (L + R) / 2, R, l, r);
  }
  pair<int, long long> last_sum_leq(int v, int L, int R, int l, long long x) {
    if (R <= l) return {-1, 0};
    if (l <= L) {
      if (get_sum(v, L, R) <= x) return {R, get_sum(v, L, R)};
      if (L == R - 1) return {L, 0};
      push(v, L, R);
      if (get_sum(2 * v + 1, L, (L + R) / 2) > x)
        return last_sum_leq(2 * v + 1, L, (L + R) / 2, l, x);
      else {
        auto a = last_sum_leq(2 * v + 2, (L + R) / 2, R, l,
                              x - get_sum(2 * v + 1, L, (L + R) / 2));
        return {a.first, a.second + get_sum(2 * v + 1, L, (L + R) / 2)};
      }
    }
    push(v, L, R);
    auto a = last_sum_leq(2 * v + 1, L, (L + R) / 2, l, x);
    if (a.first > -1) return a;
    return last_sum_leq(2 * v + 2, (L + R) / 2, R, l, x);
  }
  int first_leq(int v, int L, int R, long long x) {
    if (get_mn(v) > x) return n;
    if (L == R - 1) return L;
    push(v, L, R);
    int a = first_leq(2 * v + 1, L, (L + R) / 2, x);
    if (a < n) return a;
    return first_leq(2 * v + 2, (L + R) / 2, R, x);
  }

 public:
  segment_tree(int N) : n(N), mx(4 * n), mn(4 * n), sm(4 * n), mod(4 * n) {}
  void set(int l, int r, long long x) { set(0, 0, n, l, r, x); }
  int first_mx_less(int r, long long x) { return first_mx_less(0, 0, n, r, x); }
  pair<int, long long> last_sum_leq(int l, long long x) {
    return last_sum_leq(0, 0, n, l, x);
  }
  long long get_sum(int l, int r) { return get_sum(0, 0, n, l, r); }
  int first_leq(long long x) { return first_leq(0, 0, n, x); }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  scanf("%d %d", &n, &q);
  segment_tree st(n);
  for (int i = 0; i < (int)(n); i++) {
    int a;
    scanf("%d", &a);
    st.set(i, i + 1, a);
  }
  for (int i = 0; i < (int)(q); i++) {
    int type, x;
    long long y;
    cin >> type >> x >> y;
    scanf("%d %d %lld", &type, &x, &y);
    if (type == 1) {
      x--;
      int j = st.first_mx_less(x + 1, y);
      if (j < x + 1) st.set(j, x + 1, y);
    } else {
      x--;
      int ans = 0;
      while (x < n && y > 0) {
        int r = max(x, st.first_leq(y));
        if (r == n) break;
        auto [rr, yy] = st.last_sum_leq(r, y);
        y -= yy;
        x = rr;
        ans += rr - r;
      }
      printf("%d\n", ans);
    }
  }
  return 0;
}
