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>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
using namespace std;
using ll = long long;
template <typename T>
inline T& ckmin(T& a, T b) {
  return a = a > b ? b : a;
}
template <typename T>
inline T& ckmax(T& a, T b) {
  return a = a < b ? b : a;
}
class lazy_segment_tree {
  struct node {
    ll sum, mx, mn, lzy;
  };
  int n;
  vector<node> a;

 private:
  void push(int t, int s, int e) {
    if (a[t].lzy) {
      a[t].sum = a[t].lzy * (e - s + 1);
      a[t].mn = a[t].mx = a[t].lzy;
      if (s != e) a[t << 1 | 1].lzy = a[t << 1].lzy = a[t].lzy;
      a[t].lzy = 0;
    }
  }
  void pull(int t, int s, int e) {
    assert(e != s);
    assert(a[t].lzy == 0);
    a[t].sum = a[t << 1].sum + a[t << 1 | 1].sum;
    a[t].mx = a[t << 1].mx;
    a[t].mn = a[t << 1 | 1].mn;
  }
  void update(int t, int s, int e, int l, int r, ll y) {
    push(t, s, e);
    if (r < s || e < l) return;
    if (l <= s && e <= r) {
      a[t].lzy = y;
      push(t, s, e);
      return;
    }
    int m = (s + e) >> 1;
    update(t << 1, s, m, l, r, y);
    update(t << 1 | 1, m + 1, e, l, r, y);
    pull(t, s, e);
  }
  ll sum_query(int t, int s, int e, int l, int r) {
    push(t, s, e);
    if (r < s || e < l) return 0;
    if (l <= s && e <= r) return a[t].sum;
    int m = (s + e) >> 1;
    return sum_query(t << 1, s, m, l, r) +
           sum_query(t << 1 | 1, m + 1, e, l, r);
  }
  ll max_query(int t, int s, int e, int l, int r) {
    push(t, s, e);
    if (r < s || e < l) return 0;
    if (l <= s && e <= r) return a[t].mx;
    int m = (s + e) >> 1;
    return max(max_query(t << 1, s, m, l, r),
               max_query(t << 1 | 1, m + 1, e, l, r));
  }
  int first_leq(int t, int s, int e, ll y) {
    push(t, s, e);
    if (a[t].mn > y) return e + 1;
    if (s == e) return s;
    if (a[t << 1].mn <= y)
      return first_leq(t << 1, s, (s + e) >> 1, y);
    else
      return first_leq(t << 1 | 1, (s + e + 2) >> 1, e, y);
  }
  int first_sum_gr(int t, int s, int e, ll y) {
    push(t, s, e);
    if (s == e) return s;
    if (a[t << 1].sum <= y)
      return first_sum_gr(t << 1 | 1, (s + e + 2) >> 1, e, y - a[t << 1].sum);
    else
      return first_sum_gr(t << 1, s, (s + e) >> 1, y);
  }

 public:
  lazy_segment_tree(int n_) : n{n_}, a(n << 2) {}
  void update(int l, int r, ll y) { update(1, 0, n - 1, l, r, y); }
  ll sum_query(int l, int r) { return sum_query(1, 0, n - 1, l, r); }
  ll max_query(int l, int r) { return max_query(1, 0, n - 1, l, r); }
  int first_leq(ll y) { return first_leq(1, 0, n - 1, y); }
  int first_sum_gr(ll y) {
    if (a[1].sum <= y) return n;
    return first_sum_gr(1, 0, n - 1, y);
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, q;
  cin >> n >> q;
  vector<ll> a(n);
  for (ll& x : a) cin >> x;
  lazy_segment_tree seg(n);
  for (int i = (n)-1; i >= 0; --i) seg.update(0, i, a[i]);
  auto update = [&](int x, ll y) {
    int z = seg.first_leq(y);
    42;
    if (z > x) return;
    seg.update(z, x, y);
  };
  function<int(int, ll)> query = [&](int x, ll y) {
    if (x == n || y == 0) return 0;
    int z{x - 1};
    z = seg.first_sum_gr(y + (x ? seg.sum_query(0, x - 1) : 0)) - 1;
    if (z >= x) y -= seg.sum_query(x, z);
    int r{max(z - x + 1, 0)};
    int t = seg.first_leq(y);
    42;
    assert((t == n || seg.max_query(t, n - 1) <= y) &&
           (t == 0 || seg.max_query(t - 1, n - 1) > y));
    assert(z == n - 1 || t > max(z, x));
    if (t > max(z, x)) r += query(t, y);
    return r;
  };
  for (int _ = 0; _ < (q); ++_) {
    int t, x;
    ll y;
    cin >> t >> x >> y;
    --x;
    if (t == 1)
      update(x, y);
    else
      cout << query(x, y) << '\n';
  }
  return 0;
}
