#include <bits/stdc++.h>
using namespace std;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
const long long inf = 1000 * 1000 * 1000 + 7;
const long long INF = inf * inf;
const long long MOD = inf;
const long long N = 1e5 + 10, base = 1 << 18;
long long tab[N];
long long n, m, l;
void solve() {
  cin >> n >> m >> l;
  set<pair<long long, long long> > prze;
  for (long long i = (1); i <= (n); i++) cin >> tab[i];
  long long res = 0;
  long long bylo = false;
  for (long long i = (1); i <= (n); i++) {
    if (tab[i] <= l) bylo = false;
    if (tab[i] > l && !bylo) {
      res++;
      bylo = true;
    }
  }
  while (m--) {
    long long in;
    cin >> in;
    if (in == 0) {
      cout << res << "\n";
      continue;
    }
    long long gdzie, ile;
    cin >> gdzie >> ile;
    tab[gdzie] += ile;
    if (tab[gdzie] - ile > l || tab[gdzie] <= l) continue;
    if (tab[gdzie - 1] > l && tab[gdzie + 1] > l) res--;
    if (tab[gdzie - 1] <= l && tab[gdzie + 1] <= l) res++;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  cout << setprecision(9) << fixed;
  cerr << setprecision(6) << fixed;
  long long test = 1;
  while (test--) {
    solve();
  }
}
