#include <bits/stdc++.h>
using namespace std;
long long int nodes[100005] = {0}, par[100005] = {0};
void boost() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  long long int n, m, l;
  cin >> n >> m >> l;
  long long int arr[n + 1];
  long long int segments = 0;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    if (arr[i] > l) {
      nodes[i] = 1;
      if ((i - 1) && nodes[i - 1]) {
        nodes[i - 1]++;
        nodes[i] = nodes[i - 1];
      } else {
        segments++;
      }
    }
  }
  while (m--) {
    long long int q;
    cin >> q;
    if (q == 0) {
      cout << segments << endl;
      continue;
    } else {
      long long int p, d;
      cin >> p >> d;
      if (arr[p] > l) {
        arr[p] += d;
      } else {
        arr[p] += d;
        if (arr[p] > l) {
          nodes[p] = 1;
          segments++;
          if (p - 1 && nodes[p - 1]) {
            nodes[p] += nodes[p - 1];
            nodes[p - 1] = nodes[p];
            segments--;
          }
          if (p + 1 <= n && nodes[p + 1]) {
            nodes[p] += nodes[p + 1];
            nodes[p + 1] = nodes[p];
            segments--;
          }
        }
      }
    }
  }
}
