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;
const int maxn = 200005;
class Node {
 public:
  int l, r;
  long long v, sum, lazy;
  Node() {}
  void init(int _l, int _r) {
    l = _l;
    r = _r;
    v = 0;
    sum = 0;
    lazy = 0;
  }
  void update(long long _v) {
    if (is_leaf()) {
      sum = v = _v;
    } else {
      sum = (r - l + 1) * _v;
      lazy = _v;
    }
  }
  bool is_leaf() const { return l == r; }
};
class XDT {
 public:
  Node T[maxn * 3];
  void init_tree(int l, int r, int root = 1) {
    T[root].init(l, r);
    if (l < r) {
      int mid = (l + r) / 2;
      init_tree(l, mid, root * 2);
      init_tree(mid + 1, r, root * 2 + 1);
    }
  }
  long long update(int l, int r, int v, int root_index = 1) {
    Node &root = T[root_index];
    if (l > root.r || root.l > r) return root.sum;
    if (l <= root.l && root.r <= r) {
      root.update(v);
    } else {
      lazy_update(root_index);
      root.sum =
          update(l, r, v, root_index * 2) + update(l, r, v, root_index * 2 + 1);
    }
    return root.sum;
  }
  void lazy_update(int root_index) {
    Node &root = T[root_index];
    update(root.l, root.r, root.lazy, root_index * 2);
    update(root.l, root.r, root.lazy, root_index * 2 + 1);
    root.lazy = 0;
  }
  long long sum(int l, int r, int root_index = 1) {
    Node &root = T[root_index];
    if (l > root.r || root.l > r) return 0;
    if (l <= root.l && root.r <= r) {
      return root.sum;
    } else {
      if (root.lazy > 0) {
        lazy_update(root_index);
      }
      return sum(l, r, root_index * 2) + sum(l, r, root_index * 2 + 1);
    }
  }
  long long get(int p, int root_index = 1) {
    Node &root = T[root_index];
    if (p > root.r || p < root.l) return 0;
    if (root.lazy) {
      return root.lazy;
    } else if (root.is_leaf()) {
      return root.v;
    } else {
      return get(p, root_index * 2) + get(p, root_index * 2 + 1);
    }
  }
} T;
int main() {
  ios::sync_with_stdio(false);
  int n, q;
  cin >> n >> q;
  T.init_tree(1, n);
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    T.update(i, i, a);
  }
  for (int i = 1; i <= q; i++) {
    int t, x, y;
    cin >> t >> x >> y;
    if (t == 1 && T.get(x) < y) {
      int p = 0;
      for (int j = 20; j >= 0; j--) {
        int delta = 1 << j;
        if (p + delta <= n && T.get(p + delta) > y) {
          p += delta;
        }
      }
      T.update(p + 1, x, y);
    }
    if (t == 2) {
      int cnt = 0;
      while (x <= n) {
        if (T.get(x) > y) {
          if (T.get(n) > y) {
            break;
          }
          for (int j = 20; j >= 0; j--) {
            int delta = 1 << j;
            if (x + delta <= n && T.get(x + delta) > y) {
              x += delta;
            }
          }
          x++;
        } else {
          int p = x;
          for (int j = 20; j >= 0; j--) {
            int delta = 1 << j;
            if (p + delta <= n && T.sum(x, p + delta) <= y) {
              p += delta;
            }
          }
          cnt += p - x + 1;
          y -= T.sum(x, p);
          x = p + 1;
        }
      }
      cout << cnt << endl;
    }
  }
  return 0;
}
