#include <bits/stdc++.h>
using namespace std;
using namespace rel_ops;
using ll = int64_t;
using Pii = pair<int, int>;
using ull = uint64_t;
using Vi = vector<int>;
void run();
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(10);
  run();
  return 0;
}
int uplg(int n) { return 32 - __builtin_clz(n); }
int uplg(ll n) { return 64 - __builtin_clzll(n); }
int cmp(double a, double b, double eps = 1e-9) {
  return (a > b + eps) - (a + eps < b);
}
void run() {
  ll n, m, l;
  cin >> n >> m >> l;
  vector<ll> lens(n);
  for (auto& first : (lens)) cin >> first;
  ll cur = (lens[0] > l);
  for (int i = (1); i < (n); i++)
    if (lens[i] > l && lens[i - 1] <= l) cur++;
  while (m--) {
    int t;
    cin >> t;
    if (t == 0) {
      cout << cur << '\n';
    } else {
      int p, d;
      cin >> p >> d;
      p--;
      if (lens[p] > l) continue;
      lens[p] += d;
      if (lens[p] <= l) continue;
      bool left = (p > 0 && lens[p - 1] > l);
      bool right = (p + 1 < n && lens[p + 1] > l);
      if (!left && !right) cur++;
      if (left && right) cur--;
    }
  }
}
