#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
void pre() {}
void solve() {}
long long a[100009];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  pre();
  int n;
  cin >> n;
  int m, l;
  cin >> m >> l;
  int ans = 0;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i + 1];
    if (a[i + 1] > l && a[i] <= l) ans++;
  }
  for (int i = 0; i < (m); ++i) {
    int t;
    cin >> t;
    if (t == 0)
      cout << ans << '\n';
    else {
      long long p, d;
      cin >> p >> d;
      if (a[p] > l) continue;
      a[p] += d;
      if (a[p] > l) {
        ans++;
        if (a[p - 1] > l) ans--;
        if (a[p + 1] > l) ans--;
      }
    }
  }
  return 0;
}
