#include <bits/stdc++.h>
using namespace std;
long long len[1000006];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, q, t, x, s, m, p, d, l;
  cin >> n >> m >> l;
  for (int i = 0; i < n; i++) {
    cin >> len[i];
  }
  long long co = 0;
  long long pre;
  if (n == 1) {
    if (len[0] > l) co++;
    for (int i = 0; i < m; i++) {
      cin >> x;
      if (x == 1) {
        cin >> p >> d;
        pre = len[p - 1];
        len[p - 1] += d;
        if (len[p - 1] > l && pre <= l) {
          co++;
        }
      } else
        cout << co << "\n";
    }
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (len[i] > l) {
      co++;
      int j = i;
      while (j < n && len[j] > l) {
        j++;
      }
      if (j > i) i = j;
    }
  }
  long long prev;
  for (int i = 0; i < m; i++) {
    cin >> x;
    if (x == 1) {
      cin >> p >> d;
      p--;
      prev = len[p];
      len[p] += d;
      if (prev <= l) {
        if (len[p] > l) {
          if (p == 0) {
            if (len[p + 1] > l)
              continue;
            else {
              co++;
              continue;
            }
          } else if (p == n - 1) {
            if (len[p - 1] > l)
              continue;
            else
              co++;
          } else {
            if (len[p - 1] > l && len[p + 1] > l)
              co--;
            else if (len[p - 1] <= l && len[p + 1] <= l)
              co++;
          }
        }
      }
    } else {
      cout << max(1ll * 0, co) << "\n";
    }
  }
  return 0;
}
