#include <bits/stdc++.h>
using namespace std;
struct hom {
  int length;
  int in = 0;
};
int main() {
  int n, m, l;
  cin >> n >> m >> l;
  int otr = 0;
  hom *mas = new hom[n];
  for (int i = 0; i < n; i++) {
    cin >> mas[i].length;
    if (mas[i].length > l) mas[i].in = 1;
  }
  if (mas[0].length > l) otr++;
  for (int i = 1; i < n; i++) {
    if (mas[i].length > l && mas[i - 1].in == 0) otr++;
  }
  for (int p = 0; p < m; p++) {
    int qpe;
    cin >> qpe;
    if (qpe == 0)
      cout << otr << endl;
    else if (qpe == 1) {
      int nm, dl;
      cin >> nm >> dl;
      nm--;
      mas[nm].length += dl;
      if (mas[nm].length > l && mas[nm].in == 0) {
        mas[nm].in = 1;
        if (nm == 0) {
          if (mas[1].in == 0) {
            otr++;
            continue;
          } else
            continue;
        }
        if (nm == n - 1) {
          if (mas[nm - 1].in == 0) {
            otr++;
            continue;
          } else
            continue;
        }
        if (mas[nm - 1].in == 0 && mas[nm + 1].in == 0) otr++;
        if (mas[nm - 1].in == 1 && mas[nm + 1].in == 1) {
          otr--;
          continue;
        }
        if (mas[nm - 1].in == 1 || mas[nm = 1].in == 1) continue;
      }
    }
  }
}
