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 SegmenTree {
 private:
  int n;
  vector<int> tlazy, tmn, tmx;
  vector<long long> tsum;
  void Apply(int v) {
    tsum[v] = tsum[v << 1] + tsum[v << 1 | 1];
    tmx[v] = max(tmx[v << 1], tmx[v << 1 | 1]);
    tmn[v] = min(tmn[v << 1], tmn[v << 1 | 1]);
  }
  void Push(int v, int tl, int tr) {
    if (tl != tr) {
      tlazy[v << 1] = max(tlazy[v << 1], tlazy[v]);
      tlazy[v << 1 | 1] = max(tlazy[v << 1 | 1], tlazy[v]);
      tmx[v << 1] = max(tmx[v << 1], tlazy[v]);
      tmx[v << 1 | 1] = max(tmx[v << 1 | 1], tlazy[v]);
      tmn[v << 1] = max(tmn[v << 1], tlazy[v]);
      tmn[v << 1 | 1] = max(tmn[v << 1 | 1], tlazy[v]);
    }
    tlazy[v] = 0;
  }
  void Build(vector<int> &a, int v, int tl, int tr) {
    if (tl == tr) {
      tmx[v] = tmn[v] = tsum[v] = a[tl];
      return;
    }
    int tm = (tl + tr) >> 1;
    Build(a, v << 1, tl, tm);
    Build(a, v << 1 | 1, tm + 1, tr);
    Apply(v);
  }
  void Upd(int v, int tl, int tr, int l, int r, int value) {
    if (l > tr || tl > r) {
      return;
    }
    if (l == tl && tr == r) {
      tlazy[v] = max(tlazy[v], value);
      if (tlazy[v] >= tmx[v]) {
        tsum[v] = (tr - tl + 1) * tlazy[v];
        tmx[v] = tmn[v] = tlazy[v];
        return;
      }
      if (tlazy[v] <= tmn[v]) {
        return;
      }
    }
    Push(v, tl, tr);
    int tm = (tl + tr) >> 1;
    Upd(v << 1, tl, tm, l, min(tm, r), value);
    Upd(v << 1 | 1, tm + 1, tr, max(l, tm + 1), r, value);
    Apply(v);
  }
  int GetMax(int v, int tl, int tr, int l, int r) {
    if (l > tr || tl > r) {
      return numeric_limits<int>::min();
    }
    if (l == tl && r == tr) {
      if (tlazy[v] >= tmx[v]) {
        tsum[v] = (tr - tl + 1) * tlazy[v];
        tmx[v] = tmn[v] = tlazy[v];
      }
      Push(v, tl, tr);
      return tmx[v];
    }
    Push(v, tl, tr);
    int tm = (tl + tr) >> 1;
    return max(GetMax(v << 1, tl, tm, l, min(tm, r)),
               GetMax(v << 1 | 1, tm + 1, tr, max(l, tm + 1), r));
  }
  int GetSum(int v, int tl, int tr, int l, int r) {
    if (l > r) {
      return 0;
    }
    if (tl == l && tr == r) {
      if (tlazy[v] >= tmx[v]) {
        tsum[v] = (tr - tl + 1) * tlazy[v];
        tmx[v] = tmn[v] = tlazy[v];
        return tsum[v];
      }
      if (tlazy[v] <= tmn[v]) {
        return tsum[v];
      }
    }
    Push(v, tl, tr);
    int tm = (tl + tr) >> 1;
    return GetSum(v << 1, tl, tm, l, min(tm, r)) +
           GetSum(v << 1 | 1, tm + 1, tr, max(l, tm + 1), r);
  }

 public:
  explicit SegmenTree(int n) : n(n) {
    tmx.resize(n * 4 + 1);
    tmn.resize(n * 4 + 1);
    tsum.resize(n * 4 + 1);
    tlazy.resize(n * 4 + 1);
  }
  void Upd(int l, int r, int value) { Upd(1, 0, n - 1, l, r, value); }
  void Build(vector<int> &a) { Build(a, 1, 0, n - 1); }
  int GetMax(int l, int r) { return GetMax(1, 0, n - 1, l, r); }
  int GetSum(int l, int r) { return GetSum(1, 0, n - 1, l, r); }
};
void solve() {
  int q, n;
  cin >> n >> q;
  vector<int> a(n);
  for (auto &i : a) {
    cin >> i;
  }
  SegmenTree segmenTree(n);
  segmenTree.Build(a);
  while (q--) {
    int t, x, y;
    cin >> t >> x >> y;
    x--;
    if (t == 1) {
      segmenTree.Upd(0, x, y);
    } else {
      int ans = 0;
      while (true) {
        int l = x, r = n - 1;
        while (r - l > 1) {
          int mid = (r + l) >> 1;
          if (segmenTree.GetSum(x, mid) <= y) {
            l = mid;
          } else {
            r = mid;
          }
        }
        if (segmenTree.GetSum(x, r) <= y) {
          y -= segmenTree.GetSum(x, r);
          ans += r - x + 1;
          x = r + 1;
        } else if (segmenTree.GetSum(x, l) <= y) {
          y -= segmenTree.GetSum(x, l);
          ans += l - x + 1;
          x = l + 1;
        }
        if (x >= n) {
          break;
        }
        l = x, r = n - 1;
        while (r - l > 1) {
          int mid = (r + l) >> 1;
          if (segmenTree.GetMax(mid, mid) > y) {
            l = mid;
          } else {
            r = mid;
          }
        }
        if (segmenTree.GetMax(l, l) <= y) {
          x = l;
        } else if (segmenTree.GetMax(r, r) <= y) {
          x = r;
        } else {
          break;
        }
      }
      cout << ans << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  int test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
