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