#include <bits/stdc++.h>
using namespace std;
const long long md = 1000 * 1000;
const int maxi = 200005;
vector<pair<long long, long long> > resp;
long long tree[400005];
long long n, l;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long q, p, d, k, r, low, hig;
  long long vet[100005];
  pair<long long, long long> range[100005];
  cin >> n >> q >> l;
  for (long long i = 0LL; i < n; i++) {
    cin >> vet[i];
  }
  r = 0;
  for (long long i = 0LL; i < n;) {
    if (vet[i] > l) {
      r++;
      k = i;
      while (k < n && vet[k] > l) k++;
      i = k;
    } else {
      k = i;
      while (k < n && vet[k] <= l) k++;
      i = k;
    }
  }
  bool ver = true;
  while (q--) {
    cin >> k;
    if (k) {
      cin >> p >> d;
      p--;
      if (vet[p] <= l && vet[p] + d > l) {
        if (n == 1) {
          r = 1;
        } else {
          if (!p) {
            if (vet[p + 1] <= l) r++;
          } else if (p == n - 1) {
            if (vet[p - 1] <= l) r++;
          } else {
            if (vet[p + 1] <= l && vet[p - 1] <= l)
              r++;
            else if (vet[p + 1] > l && vet[p - 1] > l)
              r--;
          }
        }
      }
      vet[p] += d;
    } else {
      cout << r << endl;
    }
  }
}
