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;
struct node {
  long long sum, minimum, maximum, lazy;
  node() {
    sum = 0;
    lazy = 0;
  }
  node(long long S, long long Min, long long Max) {
    sum = S;
    minimum = Min;
    maximum = Max;
    lazy = 0;
  }
};
node merge(node &L, node &R) {
  return node(L.sum + R.sum, min(L.minimum, R.minimum),
              max(L.maximum, R.maximum));
}
const int MAX_N = 1e6 + 5, NOT_FOUND = -1, oo = 1e9;
node tree[3 * MAX_N];
void propagate(int n, int left, int right) {
  if (tree[n].lazy == 0) {
    return;
  }
  tree[n].maximum = tree[n].lazy;
  tree[n].minimum = tree[n].lazy;
  tree[n].sum = (right - left + 1) * tree[n].lazy;
  if (left != right) {
    tree[(2 * n)].lazy += tree[n].lazy;
    tree[(2 * n + 1)].lazy += tree[n].lazy;
  }
  tree[n].lazy = 0;
}
void update(int n, int left, int right, int query_left, int query_right,
            long long x) {
  propagate(n, left, right);
  if (right < left || query_right < query_left || query_right < left ||
      right < query_left) {
    return;
  }
  if (query_left <= left && right <= query_right) {
    tree[n].lazy = x;
    propagate(n, left, right);
    return;
  }
  int mid = (left + right) / 2;
  update((2 * n), left, mid, query_left, query_right, x);
  update((2 * n + 1), mid + 1, right, query_left, query_right, x);
  tree[n] = merge(tree[(2 * n)], tree[(2 * n + 1)]);
}
int find_first(int n, int left, int right, int x) {
  propagate(n, left, right);
  if (tree[n].minimum >= x) {
    return oo;
  }
  if (left == right) {
    return right;
  }
  int mid = (left + right) / 2;
  if (tree[(2 * n)].minimum < x) {
    return find_first((2 * n), left, mid, x);
  }
  return find_first((2 * n + 1), mid + 1, right, x);
}
void go_right(int n, int left, int right, int query_left, int query_right,
              int &M, int &C) {
  propagate(n, left, right);
  if (right < query_left || query_right < left) {
    return;
  }
  if (tree[n].minimum > M) {
    return;
  }
  if (query_left <= left && right <= query_right && tree[n].sum <= M) {
    M -= tree[n].sum;
    C += (right - left + 1);
    return;
  }
  int mid = (left + right) / 2;
  go_right((2 * n), left, mid, query_left, query_right, M, C);
  go_right((2 * n + 1), mid + 1, right, query_left, query_right, M, C);
}
int main() {
  int no_of_elements, no_of_queries;
  cin >> no_of_elements >> no_of_queries;
  for (int i = 1; i <= no_of_elements; i++) {
    int x;
    cin >> x;
    update(1, 1, no_of_elements, i, i, x);
  }
  for (int i = 1; i <= no_of_queries; i++) {
    int type, x, y;
    cin >> type >> x >> y;
    const int UPDATE = 1, QUERY = 2;
    switch (type) {
      case UPDATE: {
        int prefix = x, value = y;
        int i = find_first(1, 1, no_of_elements, value);
        update(1, 1, no_of_elements, i, prefix, value);
        break;
      }
      case QUERY: {
        int money = y, start = x;
        int visit_count = 0;
        go_right(1, 1, no_of_elements, start, no_of_elements, money,
                 visit_count);
        cout << visit_count << "\n";
      }
    }
  }
  return 0;
}
