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("O3")
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
struct Tree {
  struct Node {
    int min_val{0};
    int add_push{0};
    ll total{0};
  };
  vector<Node> nodes;
  int base;
  Tree(int n) : base(1) {
    while (base <= n + 3) {
      base *= 2;
    }
    nodes.resize(base * 2);
  }
  int lq, rq, vq;
  void Touch(int v, int len) {
    if (v < base) {
      for (int s : {v * 2, v * 2 + 1}) {
        nodes[s].min_val += nodes[v].add_push;
        nodes[s].add_push += nodes[v].add_push;
        nodes[s].total += nodes[v].add_push * ll(len) / 2;
      }
      nodes[v].add_push = 0;
    }
  }
  void AddRec(int lb, int rb, int v) {
    if (lb >= rq || rb <= lq) {
      return;
    }
    if (lq <= lb && rb <= rq) {
      nodes[v].min_val += vq;
      nodes[v].add_push += vq;
      nodes[v].total += ll(vq) * (rb - lb);
      return;
    }
    Touch(v, rb - lb);
    const int mid = (lb + rb) / 2;
    AddRec(lb, mid, v * 2);
    AddRec(mid, rb, v * 2 + 1);
    nodes[v].min_val = nodes[v * 2 + 1].min_val;
    nodes[v].total = nodes[v * 2].total + nodes[v * 2 + 1].total;
    debug() << " ["
            << "v"
               ": "
            << (v) << "] "
            << " ["
            << "nodes[v].total"
               ": "
            << (nodes[v].total) << "] ";
  }
  void Add(int L, int R, int val) {
    lq = L;
    rq = R;
    vq = val;
    AddRec(0, base, 1);
  }
  int GetFirstEnough(int val) {
    int v = 1;
    int len = base;
    while (v < base) {
      Touch(v, len);
      if (nodes[v * 2].min_val <= val) {
        v *= 2;
      } else {
        v = v * 2 + 1;
      }
    }
    return v - base;
  }
  pii Reach(int where, int val) {
    {
      vi a;
      int vx = where + base;
      while (vx >= 1) {
        a.push_back(vx);
        vx /= 2;
      }
      int len = base;
      while (!a.empty()) {
        Touch(a.back(), len);
        a.pop_back();
        len /= 2;
      }
    }
    int len = 1;
    int v = where + base;
    ll rem = val - nodes[v].total;
    while (true) {
      debug() << " ["
              << "v"
                 ": "
              << (v) << "] "
              << " ["
              << "rem"
                 ": "
              << (rem) << "] ";
      if (v == 1) {
        return {2e9, 2e9};
      }
      if (v % 2 == 0) {
        if (rem < nodes[v + 1].total) {
          break;
        }
        rem -= nodes[v + 1].total;
      }
      v /= 2;
      len *= 2;
    }
    v += 1;
    while (v < base) {
      Touch(v, len);
      if (rem < nodes[v * 2].total) {
        v *= 2;
      } else {
        rem -= nodes[v * 2].total;
        v = v * 2 + 1;
      }
      len /= 2;
    }
    return {v - base, int(rem)};
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  int n, q;
  cin >> n >> q;
  Tree tree(n + 1);
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    tree.Add(i, i + 1, a);
  }
  while (q--) {
    int type, x, y;
    cin >> type >> x >> y;
    debug() << " ["
            << "type"
               ": "
            << (type) << "] "
            << " ["
            << "x"
               ": "
            << (x) << "] "
            << " ["
            << "y"
               ": "
            << (y) << "] ";
    if (type == 1) {
      int cur = tree.GetFirstEnough(y - 1), last = y;
      while (cur < x) {
        last = tree.nodes[tree.base + cur].min_val;
        int nxt = min(x, tree.GetFirstEnough(last - 1));
        debug() << " ["
                << "cur"
                   ": "
                << (cur) << "] "
                << " ["
                << "nxt"
                   ": "
                << (nxt) << "] "
                << " ["
                << "last"
                   ": "
                << (last) << "] ";
        tree.Add(cur, nxt, y - last);
        cur = nxt;
      }
    } else {
      --x;
      int cur = max(x, tree.GetFirstEnough(y));
      int ans = 0;
      while (cur < n) {
        debug() << " ["
                << "cur"
                   ": "
                << (cur) << "] ";
        auto [first_no, rem] = tree.Reach(cur, y);
        debug() << " ["
                << "first_no"
                   ": "
                << (first_no) << "] "
                << " ["
                << "rem"
                   ": "
                << (rem) << "] ";
        y = rem;
        ans += min(n, first_no) - cur;
        if (first_no >= n) {
          break;
        }
        cur = tree.GetFirstEnough(y);
      }
      cout << ans << "\n";
    }
  }
}
