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;
template <class T>
struct SegTree {
  struct node {
    node* left;
    node* right;
    T sum;
    T add;
    T mxr;
    T mxl;
    T cnt;
    node() {
      left = right = nullptr;
      sum = 0;
      add = 0;
      mxr = 0;
      mxl = 0;
      cnt = 0;
    }
  };
  node* root;
  SegTree() { root = nullptr; }
  SegTree(int n, vector<T>& a) {
    root = nullptr;
    build(0, n - 1, a, root);
  }
  void push(node*& v) {
    if (v->left->add < v->add) {
      v->left->mxr = v->add;
      v->left->mxl = v->add;
      v->left->sum = v->left->cnt * v->add;
    }
    if (v->right->add < v->add) {
      v->right->mxr = v->add;
      v->right->mxl = v->add;
      v->right->sum = v->right->cnt * v->add;
    }
  }
  void build(int l, int r, vector<T>& a, node*& v) {
    if (!v) v = new node;
    if (l == r) {
      v->sum = a[l];
      v->cnt = 1;
      v->mxr = a[l];
      v->mxl = a[l];
      return;
    }
    int m = (l + r) / 2;
    build(l, m, a, v->left);
    build(m + 1, r, a, v->right);
    v->cnt = r - l + 1;
    v->sum = v->left->sum + v->right->sum;
    v->mxr = v->right->mxr;
    v->mxl = v->left->mxl;
  }
  long long query(int l, int r, int ql, int qr, T& val, node*& v) {
    assert(v != nullptr);
    if (ql > qr) return 0;
    if (ql == l && qr == r && val >= v->sum) {
      val -= v->sum;
      return v->cnt;
    }
    if (v->mxr > val) return 0;
    int m = (l + r) / 2;
    push(v);
    long long f = 0, s = 0;
    f = query(l, m, ql, min(qr, m), val, v->left);
    s = query(m + 1, r, max(ql, m + 1), qr, val, v->right);
    v->sum = v->left->sum + v->right->sum;
    v->mxr = v->right->mxr;
    v->mxl = v->left->mxl;
    return f + s;
  }
  void modify(int l, int r, int ql, int qr, T val, node*& v) {
    assert(v != nullptr);
    if (ql > qr) return;
    if (ql == l && qr == r && v->mxl <= val) {
      v->add = val;
      v->sum = val * (r - l + 1);
      v->mxl = val;
      v->mxr = val;
      return;
    }
    if (v->mxr > val) return;
    int m = (l + r) / 2;
    push(v);
    modify(l, m, ql, min(m, qr), val, v->left);
    modify(m + 1, r, max(ql, m + 1), qr, val, v->right);
    v->sum = v->left->sum + v->right->sum;
    v->mxr = v->right->mxr;
    v->mxl = v->left->mxl;
  }
};
void solve() {
  int n, q;
  cin >> n >> q;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  SegTree<long long> tree(n, a);
  for (int i = 0; i < q; i++) {
    long long t, x, y;
    cin >> t >> x >> y;
    x--;
    if (t == 1) {
      tree.modify(0, n - 1, 0, x, y, tree.root);
    } else {
      cout << tree.query(0, n - 1, x, n - 1, y, tree.root) << '\n';
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  for (; q > 0; q--) {
    solve();
    cout << endl;
  }
}
