#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, l;
  cin >> n >> m >> l;
  vector<ll> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int answer = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] > l && (i == 0 || a[i - 1] <= l)) {
      ++answer;
    }
  }
  for (int i = 0; i < m; ++i) {
    int type;
    cin >> type;
    if (type == 0) {
      cout << answer << "\n";
    } else {
      int p, d;
      cin >> p >> d;
      --p;
      if (a[p] <= l && a[p] + d > l) {
        ++answer;
        if (p > 0 && a[p - 1] > l) {
          --answer;
        }
        if (p + 1 < n && a[p + 1] > l) {
          --answer;
        }
      }
      a[p] += d;
    }
  }
  return 0;
}
