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 N = 2e5 + 100;
int a[N], n, q;
struct Node {
  long long sum;
  int MIN, MAX, len, lazy;
  Node operator+(const Node &that) const {
    Node ret;
    ret.sum = this->sum + that.sum;
    ret.len = this->len + that.len;
    ret.MIN = min(this->MIN, that.MIN);
    ret.MAX = max(this->MAX, that.MAX);
    ret.lazy = 0;
    return ret;
  }
} IT[N * 4];
void Build(int k, int l, int r) {
  if (l == r) {
    IT[k] = {a[l], a[l], a[l], 1, 0};
    return;
  }
  int m = (l + r) >> 1;
  Build(k << 1, l, m);
  Build(k << 1 | 1, m + 1, r);
  IT[k] = IT[k << 1] + IT[k << 1 | 1];
}
void Change(int k, int val) {
  if (IT[k].MIN >= val) return;
  if (IT[k].MAX < val) {
    IT[k] = {1ll * val * IT[k].len, val, val, IT[k].len, val};
    return;
  }
}
void Down(int k) {
  Change(k << 1, IT[k].lazy);
  Change(k << 1 | 1, IT[k].lazy);
  IT[k].lazy = 0;
}
void Up(int k, int l, int r, int u, int v, int val) {
  if (l > v || r < u) return;
  if (u <= l && r <= v) {
    Change(k, val);
    return;
  }
  Down(k);
  int m = (l + r) >> 1;
  Up(k << 1, l, m, u, v, val);
  Up(k << 1 | 1, m + 1, r, u, v, val);
  IT[k] = IT[k << 1] + IT[k << 1 | 1];
}
long long QuerySum(int k, int l, int r, int u, int v) {
  if (l > v || r < u) return 0;
  if (u <= l && r <= v) return IT[k].sum;
  Down(k);
  int m = (l + r) >> 1;
  return QuerySum(k << 1, l, m, u, v) + QuerySum(k << 1 | 1, m + 1, r, u, v);
}
int Find(int k, int l, int r, long long &val) {
  if (l == r) return l + (val >= IT[k].sum);
  Down(k);
  int m = (l + r) >> 1;
  if (IT[k << 1].sum > val) return Find(k << 1, l, m, val);
  val -= IT[k << 1].sum;
  return Find(k << 1 | 1, m + 1, r, val);
};
int Find2(int k, int l, int r, int val) {
  if (IT[k].MIN > val) return r + 1;
  if (l == r) return l;
  Down(k);
  int m = (l + r) >> 1;
  int x = Find2(k << 1, l, m, val);
  if (x != m + 1) return x;
  return Find2(k << 1 | 1, m + 1, r, val);
};
int Query(int x, int y) {
  int step = x;
  int ans = 0;
  long long sum = y;
  while (step <= n) {
    long long pref = QuerySum(1, 1, n, 1, step - 1);
    long long fake_sum = sum + pref;
    int nxt = Find(1, 1, n, fake_sum);
    sum = fake_sum;
    ans += nxt - step;
    if (nxt > n) break;
    step = Find2(1, 1, n, sum);
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  Build(1, 1, n);
  while (q--) {
    int t, x, y;
    cin >> t >> x >> y;
    if (t == 1) {
      Up(1, 1, n, 1, x, y);
    } else {
      cout << Query(x, y) << '\n';
    }
  }
}
