#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long INF = 1e18;
const int mod = 1e9 + 7;
const int maxn = (int)1e5 + 2;
const int mov[4][2] = {-1, 0, 1, 0, 0, 1, 0, -1};
const int Mov[8][2] = {-1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 1};
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void read(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
  return;
}
long long a[maxn];
int tot;
int n, m, l;
inline void check(int i) {
  if (i == 1) {
    if (a[i + 1] <= l) tot++;
  } else if (i == n) {
    if (a[i - 1] <= l) tot++;
  } else {
    if (a[i - 1] > l && a[i + 1] > l)
      tot--;
    else if (a[i - 1] <= l && a[i + 1] <= l)
      tot++;
  }
}
int main(void) {
  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cin >> n >> m >> l;
  tot = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > l && a[i - 1] <= l) tot++;
  }
  while (m--) {
    bool op;
    cin >> op;
    if (op) {
      int i, add;
      cin >> i >> add;
      a[i] += add;
      if (a[i] - add <= l && a[i] > l) check(i);
    } else
      cout << max(0, tot) << endl;
  }
}
