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 = 1e6 + 100;
long long ksm(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans *= a;
      ans %= 1000000007;
    }
    a *= a;
    a %= 1000000007;
    b >>= 1;
  }
  return ans;
}
int t, n, m;
int tr[N << 2], lazy[N << 2], ge[N << 2], a[N], mi[N << 2];
long long sum[N << 2];
void pushup(int x) {
  tr[x] = max(tr[x << 1], tr[x << 1 | 1]);
  mi[x] = min(mi[x << 1], mi[x << 1 | 1]);
  sum[x] = sum[x << 1] + sum[x << 1 | 1];
}
void pushdown(int x, int l, int r) {
  if (lazy[x]) {
    if (l == r) {
      sum[x] = lazy[x];
      tr[x] = lazy[x];
      lazy[x] = 0;
    } else {
      lazy[x << 1] = lazy[x];
      lazy[x << 1 | 1] = lazy[x];
      tr[x << 1] = mi[x << 1] = lazy[x];
      int mid = (l + r) >> 1;
      sum[x << 1] = (long long)tr[x << 1] * (mid - l + 1);
      tr[x << 1 | 1] = mi[x << 1 | 1] = lazy[x];
      sum[x << 1 | 1] = (long long)tr[x << 1 | 1] * (r - mid);
      lazy[x] = 0;
    }
  }
}
void build(int x, int l, int r) {
  lazy[x] = 0;
  if (l == r) {
    tr[x] = a[l];
    sum[x] = (long long)a[l];
    mi[x] = a[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(x << 1, l, mid);
  build(x << 1 | 1, mid + 1, r);
  pushup(x);
}
void update(int x, int l, int r, int L, int R, int zhi) {
  if (mi[x] > zhi) {
    return;
  }
  if (L <= l && r <= R) {
    if (tr[x] <= zhi) {
      lazy[x] = zhi;
      sum[x] += (long long)(zhi - tr[x]) * (r - l + 1);
      tr[x] = zhi;
    }
    return;
  }
  pushdown(x, l, r);
  int mid = (l + r) >> 1;
  if (mid >= L) {
    update(x << 1, l, mid, L, R, zhi);
  }
  if (R > mid) {
    update(x << 1 | 1, mid + 1, r, L, R, zhi);
  }
  pushup(x);
}
long long ans;
int g = 0;
void querry(int x, int l, int r, int L, int R) {
  if (mi[x] > ans) {
    return;
  }
  if (L <= l && r <= R && sum[x] <= ans) {
    ans -= sum[x];
    g += (r - l + 1);
    return;
  }
  pushdown(x, l, r);
  int mid = (l + r) >> 1;
  if (mid >= L) {
    querry(x << 1, l, mid, L, R);
  }
  if (R > mid) {
    querry(x << 1 | 1, mid + 1, r, L, R);
  }
  pushup(x);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  build(1, 1, n);
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", &x);
    if (x == 1) {
      int r, zhi;
      scanf("%d%d", &r, &zhi);
      update(1, 1, n, 1, r, zhi);
    } else {
      int l;
      scanf("%d%lld", &l, &ans);
      g = 0;
      querry(1, 1, n, l, n);
      printf("%d\n", g);
    }
  }
  return 0;
}
