#include <bits/stdc++.h>
using namespace std;
int N, M;
long long int L;
vector<long long int> A;
vector<int> parent;
vector<int> rnk;
int disjointSetsCount;
void initDisjointSets(int n) {
  for (int i = 0; i < n; ++i) {
    parent.push_back(i);
    rnk.push_back(1);
  }
}
int findRoot(int n) {
  return parent[n] == n ? n : (parent[n] = findRoot(parent[n]));
}
bool isSameSet(int p, int q) { return findRoot(p) == findRoot(q); }
void join(int p, int q) {
  int rootP = findRoot(p), rootQ = findRoot(q);
  if (rootP == rootQ) {
    return;
  }
  --disjointSetsCount;
  if (rnk[rootP] < rnk[rootQ]) {
    parent[rootP] = rootQ;
    rnk[rootQ] += rnk[rootP];
    return;
  }
  parent[rootQ] = rootP;
  rnk[rootP] += rnk[rootQ];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int i, x, p;
  long long int d;
  cin >> N >> M >> L;
  initDisjointSets(N);
  for (i = 0; i < N; ++i) {
    cin >> x;
    A.push_back(x);
  }
  for (i = 0; i < N; ++i) {
    if (A[i] > L) {
      ++disjointSetsCount;
      if ((i - 1) >= 0 and A[i - 1] > L) {
        join(i, i - 1);
      }
    }
  }
  for (i = 0; i < M; ++i) {
    cin >> x;
    if (x > 0) {
      cin >> p >> d;
      A[p - 1] += d;
      if (A[p - 1] > L) {
        if ((A[p - 1] - d) <= L) {
          ++disjointSetsCount;
        }
        if (p < N and A[p] > L) {
          join(p - 1, p);
        }
        if ((p - 2) >= 0 and A[p - 2] > L) {
          join(p - 1, p - 2);
        }
      }
    } else {
      cout << disjointSetsCount << '\n';
    }
  }
  return 0;
}
