#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
using ll = long long;
ll a[N];
int n, m, l;
int par[N], rnk[N];
void init() {
  for (int i = 1; i <= n; i++) {
    par[i] = i;
    rnk[i] = 0;
  }
}
int find(int x) { return par[x] == x ? x : par[x] = find(par[x]); }
void unite(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  if (rnk[x] < rnk[y])
    par[x] = y;
  else {
    par[y] = x;
    if (rnk[x] == rnk[y]) rnk[x]++;
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &l);
  init();
  int cnt = 0, sz = n;
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] <= l) cnt++;
    if (a[i] > l && a[i - 1] > l) {
      int x = find(i), y = find(i - 1);
      if (x == y) continue;
      unite(i, i - 1);
      sz--;
    }
  }
  while (m--) {
    int op, p, d;
    scanf("%d", &op);
    if (op == 0)
      printf("%d\n", sz - cnt);
    else {
      scanf("%d%d", &p, &d);
      if (a[p] <= l && a[p] + d > l) {
        cnt--;
        int x = find(p), y = find(p - 1), z = find(p + 1);
        if (a[p - 1] > l && x != y) {
          unite(x, y);
          sz--;
        }
        if (a[p + 1] > l && x != z) {
          unite(x, z);
          sz--;
        }
      }
      a[p] += d;
    }
  }
}
