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("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
const long long N = 200005;
struct segment {
  long long sum = 0, mn = 0, mx = 0;
} tree[4 * N];
long long lazy[4 * N], n, q, a[N];
void push(long long node, long long l, long long r) {
  if (lazy[node]) {
    long long mid = (l + r) / 2;
    tree[2 * node].mn = tree[2 * node].mx = lazy[node];
    tree[2 * node].sum = (mid - l + 1) * lazy[node];
    tree[2 * node + 1].mn = tree[2 * node + 1].mx = lazy[node];
    tree[2 * node + 1].sum = (r - mid) * lazy[node];
    lazy[2 * node] = lazy[2 * node + 1] = lazy[node];
    lazy[node] = 0;
  }
}
void build(long long node, long long l, long long r) {
  if (l == r) {
    tree[node].mx = tree[node].mn = tree[node].sum = a[l];
    return;
  }
  long long mid = (l + r) / 2;
  build(2 * node, l, mid);
  build(2 * node + 1, mid + 1, r);
  tree[node].sum = tree[2 * node].sum + tree[2 * node + 1].sum;
  tree[node].mn = tree[2 * node + 1].mn;
  tree[node].mx = tree[2 * node].mx;
}
void update(long long node, long long l, long long r, long long s, long long e,
            long long val) {
  if (r < s || e < l || tree[node].mn >= val) return;
  if (s <= l && r >= e && tree[node].mx <= val) {
    tree[node].mn = tree[node].mx = val;
    tree[node].sum = (r - l + 1) * val;
    lazy[node] = val;
    return;
  }
  long long mid = (l + r) / 2;
  push(node, l, r);
  update(2 * node, l, mid, s, e, val);
  update(2 * node + 1, mid + 1, r, s, e, val);
  tree[node].sum = tree[2 * node].sum + tree[2 * node + 1].sum;
  tree[node].mn = tree[2 * node + 1].mn;
  tree[node].mx = tree[2 * node].mx;
}
pair<long long, long long> query(long long node, long long l, long long r,
                                 long long s, long long rem) {
  if (r < s || tree[node].mn > rem) return {0, rem};
  if (s <= l && tree[node].sum <= rem) return {r - l + 1, rem - tree[node].sum};
  long long mid = (l + r) / 2;
  push(node, l, r);
  auto x = query(2 * node, l, mid, s, rem);
  auto y = query(2 * node + 1, mid + 1, r, s, x.second);
  return {x.first + y.first, y.second};
}
void solve() {
  cin >> n >> q;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  build(1, 1, n);
  while (q--) {
    long long type, x, y;
    cin >> type;
    if (type == 1) {
      cin >> x >> y;
      update(1, 1, n, 1, x, y);
    } else {
      cin >> x >> y;
      cout << query(1, 1, n, x, y).first << "\n";
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
