#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007, N = 1e5 + 5;
int a[N], p[N], r[N], vis[N];
void pre() {
  for (int i = 0; i < N; i++) p[i] = i, r[i] = 0;
}
int f(int v) { return (v == p[v] ? v : p[v] = f(p[v])); }
void unite(int u, int v) {
  u = f(u), v = f(v);
  if (u == v) return;
  if (r[u] > r[v])
    p[v] = u;
  else
    r[v]++, p[u] = v;
}
int main() {
  pre();
  int n, m, l, ans = 0;
  cin >> n >> m >> l;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > l) r[i]++;
    if (a[i] > l && a[i - 1] > l) unite(i, i - 1);
  }
  for (int i = 1; i <= n; i++) {
    if (!vis[f(i)] && r[f(i)] > 0) vis[f(i)] = 1, ans++;
  }
  while (m--) {
    int x, d, p;
    cin >> x;
    if (!x) {
      cout << ans << "\n";
      continue;
    }
    cin >> p >> d;
    a[p] += d;
    if (a[p] <= l || vis[f(p)]) continue;
    if (r[f(p - 1)] > 0 && r[f(p + 1)] > 0) {
      unite(p, p + 1);
      unite(p, p - 1);
      vis[f(p)] = 1;
      ans--;
    } else if (r[f(p - 1)] > 0)
      unite(p, p - 1);
    else if (r[f(p + 1)] > 0)
      unite(p, p + 1);
    else if (!vis[p])
      vis[p] = 1, ans++, r[p]++;
    else
      r[p]++;
  }
  return 0;
}
