#include <bits/stdc++.h>
using namespace std;
const int OO = 0x3f3f3f3f, NegOO = -1 * OO, N = 1e5 + 5, mod = 1e9 + 7;
int lf[N], re[N];
int main() {
  ios_base::sync_with_stdio(0), ios::sync_with_stdio(0), cin.tie(0),
      cout.tie(0);
  long long n, m, l;
  cin >> n >> m >> l;
  long long arr[n];
  long long pre = -1, numseg = 0, t, p, d;
  memset(lf, -1, sizeof(lf));
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    if (arr[i] <= l)
      pre = -1;
    else {
      if (pre == -1)
        pre = i, lf[i] = i, numseg++;
      else
        lf[i] = pre;
    }
  }
  while (m--) {
    cin >> t;
    if (!t)
      cout << numseg << "\n";
    else {
      cin >> p >> d;
      --p;
      arr[p] += d;
      if (arr[p] > l && arr[p] - d <= l) {
        if (lf[p - 1] == -1 || p == 0) {
          lf[p] = p;
          if (lf[p + 1] == -1)
            numseg++;
          else
            lf[p + 1] = p;
        } else if (lf[p - 1] != -1) {
          if (p == 0) {
            if (lf[p + 1] == -1)
              numseg++, lf[p] = p;
            else
              lf[p] = p, lf[p + 1] = lf[p];
          } else {
            if (lf[p + 1] == -1)
              lf[p] = lf[p - 1];
            else
              lf[p] = lf[p - 1], lf[p + 1] = lf[p], numseg--;
          }
        }
      }
    }
  }
  return 0;
}
