#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, m, l;
  cin >> n >> m >> l;
  long long cnt = 0, a[100007], vis[100007] = {0};
  for (long long i = 1; i <= (long long)n; ++i) cin >> a[i];
  for (long long i = 1; i <= (long long)n; ++i) {
    if (a[i] > l) {
      if (i == 1 || a[i - 1] <= l) {
        cnt++;
      }
      vis[i] = 1;
    }
  }
  for (long long i = 1; i <= (long long)m; ++i) {
    int x;
    cin >> x;
    if (x == 0)
      cout << cnt << endl;
    else {
      long long p, q;
      cin >> p >> q;
      a[p] += q;
      if (a[p] > l) {
        int pre = vis[p - 1];
        int nxt = vis[p + 1];
        int cur = vis[p];
        if (pre && nxt && !cur)
          cnt--;
        else if ((pre || nxt || cur))
          ;
        else if (!cur)
          cnt++;
        vis[p] = 1;
      }
    }
  }
}
