#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const long long INF = 1e9;
long long la, ra, ta, lb, rb, tb;
struct disjoint_intervals {
  set<pair<int, int> > s;
  void insert(pair<int, int> v) {
    if (v.first >= v.second) return;
    auto at = s.lower_bound(v);
    auto it = at;
    if (at != s.begin() && (--at)->second >= v.first) v.first = at->first, --it;
    for (; it != s.end() && it->first <= v.second; s.erase(it++))
      v.second = max(v.second, it->second);
    s.insert(v);
  }
};
long long N, M, L;
vector<int> hair(MAXN);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M >> L;
  disjoint_intervals DI;
  for (int i = (0); i < int(N); i++) cin >> hair[i];
  for (int i = (0); i < int(N); i++)
    if (hair[i] > L) DI.insert({i, i + 1});
  int k, p, d;
  for (int q = (0); q < int(M); q++) {
    cin >> k;
    if (k == 0)
      cout << DI.s.size() << '\n';
    else {
      cin >> p >> d;
      hair[p - 1] += d;
      if (hair[p - 1] > L) DI.insert({p - 1, p});
    }
  }
  return 0;
}
