#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("-O2")
template <typename tp>
void in(tp &dig) {
  char ch = getchar();
  dig = 0;
  long long flag = 0;
  while (!isdigit(ch)) {
    if (ch == '-') flag = 1;
    ch = getchar();
  }
  while (isdigit(ch)) dig = dig * 10 + ch - '0', ch = getchar();
  if (flag) dig = -dig;
}
template <typename T>
void chkmax(T &x, T y) {
  x = max(x, y);
}
template <typename T>
void chkmin(T &x, T y) {
  x = min(x, y);
}
const int LIM = 2e5 + 5, MOD = 1e9 + 7;
int n, m, l, qwer, t, x, y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> qwer >> l;
  int h[n + 1], m[n + 2];
  for (int i = 0; i < n; i++) {
    cin >> h[i + 1];
  }
  int ans = 0;
  m[0] = 0;
  m[n + 1] = 0;
  for (int i = 1; i < n + 1; i++) {
    if (h[i] <= l) {
      m[i] = 0;
      continue;
    }
    if (m[i - 1] == 0) {
      ans++;
      m[i] = 1;
    } else {
      m[i] = 1;
    }
  }
  for (int i = 0; i < qwer; i++) {
    cin >> x;
    if (x == 0)
      cout << ans << "\n";
    else {
      cin >> y >> t;
      if (m[y] == 1)
        continue;
      else if (h[y] + t <= l)
        h[y] += t;
      else {
        int r = m[y - 1] + m[y + 1];
        if (r == 2)
          ans--;
        else if (r == 0)
          ans++;
        m[y] = 1;
      }
    }
  }
  return 0;
}
