#include <bits/stdc++.h>
using namespace std;
long long n, i, x[100006], l, m, ans, t, p, q;
int main() {
  cin >> n >> m >> l;
  for (i = 0; i < n; ++i) cin >> x[i];
  for (i = 0; i < n; ++i) {
    if (x[i] > l && x[i + 1] <= l) ++ans;
  }
  while (m--) {
    cin >> t;
    if (t == 1) {
      cin >> p >> q;
      if (x[p - 1] > l) {
        x[p - 1] += q;
      } else if (p == 1) {
        if (x[0] + q > l && x[1] <= l) ++ans;
        x[0] += q;
      } else if (p == n) {
        if (x[n - 1] + q > l && x[n - 2] <= l) ++ans;
        x[n - 1] += q;
      } else {
        p--;
        if (x[p] + q > l && x[p - 1] <= l && x[p + 1] <= l)
          ++ans;
        else if (x[p] + q > l && x[p - 1] > l && x[p + 1] > l)
          --ans;
        x[p] += q;
      }
    } else if (t == 0)
      cout << ans << endl;
  }
  return 0;
}
