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

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>

#define ff(i,a,b) for(int (i) = (a); (i) <= (b); ++(i))
#define fb(i,a,b) for(int (i) = (a); (i) >= (b); --(i))
#define mod 998244353
#define xx first
#define yy second
#define all(a) (a).begin(), (a).end()
#define pb push_back
#define ll long long
#define pii pair<int,int>


using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>,rb_tree_tag, tree_order_statistics_node_update> ordered_set;/// find_by_order(x)(x+1th) , order_of_key() (strictly less)
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

int n,q;

ll seg[900005];
ll mini[900005];
ll lejzi[900005];
ll niz[900005];


void init(int node, int l, int r){
    if(l == r){
        seg[node] = niz[l];
        mini[node] = niz[l];
        return;
    }
    int mid = (l + r) / 2;
    init(node * 2, l, mid);
    init(node * 2 + 1, mid + 1, r);
    seg[node] = seg[node * 2 + 1] + seg[node * 2];
    mini[node] = min(mini[node * 2 + 1], mini[node * 2]);
}
void propagate(int node, int l, int r){
    if(lejzi[node] == 0)return;
    seg[node] = (r - l + 1) * lejzi[node];
    mini[node] = lejzi[node];
    if(l != r){
        lejzi[node * 2] = lejzi[node];
        lejzi[node * 2 + 1] = lejzi[node];
    }
    lejzi[node] = 0;
}
void update(int node, int l, int r, int levo, int desno, ll val){
    propagate(node, l, r);
    if(r < levo || desno < l)return;
    if(l >= levo && r<= desno){
        lejzi[node] = val;
        propagate(node, l, r);
        return;
    }
    int mid = (l + r) / 2;
    update(node * 2, l, mid, levo, desno, val);
    update(node * 2 + 1, mid + 1, r, levo, desno, val);
    seg[node] = seg[node * 2] + seg[node * 2 + 1];
    mini[node] = min(mini[node * 2], mini[node * 2 + 1]);
}
ll query(int node, int l, int r, int levo, int desno){
    propagate(node, l, r);
    if(r < levo || desno < l)return 0;
    if(l >= levo && r <= desno)return seg[node];
    int mid = (l + r) / 2;
    return query(node * 2, l, mid, levo, desno) + query(node * 2 + 1, mid + 1, r, levo, desno);
}


ll get(int l, int r){
    return query(1,1,n,l,r);
}

ll walkmin(ll x){
    int node = 1;
    int l = 1;
    int r = n;
    while(l < r){
        int mid = (l + r) / 2;
        int p1 = mini[node * 2];
        int p2 = mini[node * 2 + 1];
        if(p1 > x){
            l = mid + 1;
            node = node * 2 + 1;
        }
        else{
            r = mid;
            node = node * 2;
        }
    }
    return l;
}

ll walksum(int poc, ll x){
    int node = 1;
    int l = 1;
    ll prvi = x;
    int r = n;
    if(poc != 1)x += get(1, poc - 1);
    x = min(x, seg[1]);
    while(l < r){
        int mid = (l + r) / 2;
        ll prvi = seg[node * 2];
        ll drugi = seg[node * 2 + 1];
        if(prvi >= x){
            r = mid;
            node = node * 2;
        }
        else{
            node = node * 2 + 1;
            l = mid + 1;
            x -= prvi;
        }
    }
    if(get(poc, l) > prvi)l--;
    return l;
}


int main()
{

    ios_base::sync_with_stdio(false); cin.tie(0);
    cerr.tie(0);
     cout.tie(0);

    cin >> n >> q;
    ff(i,1,n)cin >> niz[i];
    init(1,1,n);

    while(q -- ){
        int idx;
        cin >> idx;
        if(idx == 1){
            //int l = 1;
            int x;
            ll y;
            cin >> x >> y;
            int r = x;
            if(get(r,r) >= y)continue;

            int l = 0;
            fb(j,18,0){
                int sta = (1<<j) + l;
                if(sta > n)continue;
                if(get(sta,sta) > y)l = sta;
            }
            l++;
            update(1,1,n,l,x,y);
        }
        else{
            int x;
            ll y;
            cin >> x >> y;
            int ans = 0;
            int tr = x;
            ll last = get(n,n);
            while(tr <= n){
                //cout << "aa\n";
                if(last > y)break;
                if(get(tr,tr) > y){
                    tr = walkmin(y);
                }
                //cout << tr << "\n";
                int sta = walksum(tr, y);
                ans += (sta - tr + 1);
                y -= get(tr, sta);
                tr = sta+1;
            }
            cout << ans << "\n";
        }
    }

    return 0;
}
