#include <bits/stdc++.h>
using namespace std;
int n, m, l, o, ans, fa[100005];
long long a[100005];
set<int> S;
inline int find_set(int x) { return x == fa[x] ? x : fa[x] = find_set(fa[x]); }
int main() {
  scanf("%d%d%d", &n, &m, &l);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
    if (a[i] > l) {
      fa[i] = i;
      if (find_set(i - 1)) fa[i] = find_set(i - 1);
    }
  }
  for (int i = 1; i <= n; i++)
    if (find_set(i)) S.insert(find_set(i));
  ans = S.size();
  while (m--) {
    scanf("%d", &o);
    if (o == 0)
      printf("%d\n", ans);
    else {
      int p, q;
      scanf("%d%d", &p, &q);
      a[p] += q;
      if (a[p] > l && a[p] - q <= l) {
        fa[p] = p, ans++;
        if (find_set(p - 1)) fa[p] = find_set(p - 1), ans--;
        if (find_set(p + 1)) fa[find_set(p)] = find_set(p + 1), ans--;
      }
    }
  }
  return 0;
}
