#include <bits/stdc++.h>
const int MAXN = 1e5 + 10;
long long a[MAXN];
int main() {
  long long n, m, l;
  while (scanf("%lld%lld%lld", &n, &m, &l) != EOF) {
    int ans = 0;
    memset(a, 0, sizeof(a));
    for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
    for (int i = 1; i <= n; i++) {
      if (a[i] > l) {
        while (i <= n && a[i] > l) i++;
        ans++;
      }
    }
    while (m--) {
      int x, b, c;
      scanf("%d", &x);
      if (x == 0)
        printf("%d\n", ans);
      else {
        scanf("%d%d", &b, &c);
        if (a[b] <= l && a[b] + c > l) {
          ans++;
          if (a[b - 1] > l) ans--;
          if (a[b + 1] > l) ans--;
        }
        a[b] += c;
      }
    }
  }
  return 0;
}
