#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  long long n, m, l;
  cin >> n >> m >> l;
  vector<long long> a(n);
  vector<pair<long long, long long>> lr(n);
  long long ans = 0, old = -1000;
  long long flag = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > l) {
      if (flag == 0) ans++;
      flag = 1;
    }
    if (a[i] <= l && flag == 1) {
      flag = 0;
    }
  }
  while (m--) {
    long long tp;
    cin >> tp;
    if (tp == 0) {
      cout << ans << endl;
    } else {
      long long p, d;
      cin >> p >> d;
      if (n > 1) {
        if (a[p - 1] <= l && a[p - 1] + d > l) {
          if (p - 1 > 0 && p - 1 < n - 1) {
            if (a[p - 2] > l && a[p] > l)
              ans--;
            else if (a[p - 2] <= l && a[p] > l)
              ans += 0;
            else if (a[p - 2] > l && a[p] <= l)
              ans += 0;
            else
              ans++;
          } else if (p - 1 == 0) {
            if (a[p] > l)
              ans += 0;
            else if (a[p] <= l)
              ans++;
          } else {
            if (a[p - 2] > l)
              ans += 0;
            else if (a[p - 2] <= l)
              ans++;
          }
        }
      } else {
        if (a[p - 1] <= l && a[p - 1] + d > l) ans++;
      }
      a[p - 1] += d;
    }
  }
  return 0;
}
