#include <bits/stdc++.h>
using namespace std;
long long n, m, l, q, p, d, nr, ok, r, a[100005], tt[100005];
bool v[100005];
void init(long long n, long long a[], long long x) {
  for (int i = 1; i <= n; i++) {
    if (a[i] > x) {
      tt[i] = i;
      v[i] = 1;
      nr++;
    } else
      tt[i] = 0;
  }
}
long long gasit(long long x) {
  long long r = x, aux;
  while (tt[r] != r) r = tt[r];
  while (tt[x] != r) {
    aux = tt[x];
    tt[x] = r;
    x = aux;
  }
  return r;
}
void uneste(long long x, long long y) {
  long long rx = gasit(x), ry = gasit(y);
  if (rx != ry) tt[rx] = ry;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> l;
  for (int i = 1; i <= n; i++) cin >> a[i];
  init(n, a, l);
  for (int i = 1; i < n; i++) {
    if (a[i] > l) {
      if (a[i + 1] > l) {
        uneste(i + 1, i);
        r = gasit(i + 1);
        v[r] = 0;
        nr--;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    cin >> q;
    if (q == 1) {
      cin >> p >> d;
      a[p] += d;
      r = gasit(p);
      if (r == 0 && a[p] > l) {
        tt[p] = p;
        if ((p < n && a[p + 1] > l) && (p > 1 && a[p - 1] > l)) {
          r = gasit(p);
          v[r] = 0;
          nr--;
          uneste(p, p + 1);
          uneste(p, p - 1);
        } else {
          if (p < n && a[p + 1] > l)
            uneste(p, p + 1);
          else if (p > 1 && a[p - 1] > l)
            uneste(p, p - 1);
          else {
            tt[p] = p;
            v[p] = 1;
            nr++;
          }
        }
      }
    } else
      cout << nr << "\n";
  }
  return 0;
}
