#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long TESTS = 1;
  while (TESTS--) {
    long long n, q, l;
    cin >> n >> q >> l;
    vector<long long> a(n + 1);
    for (long long i = 1; i < n + 1; i++) cin >> a[i];
    long long ans = 0, cnt = 0;
    for (long long i = 1; i < n + 1; i++)
      if (a[i] > l)
        cnt++;
      else if (cnt)
        ans++, cnt = 0;
    if (cnt) ans++;
    while (q--) {
      long long ch;
      cin >> ch;
      if (!ch)
        cout << ans << '\n';
      else {
        long long p, d;
        cin >> p >> d;
        if (n == 1) {
          a[1] += d;
          if (a[1] > l) ans = 1;
          continue;
        }
        if (p == 1) {
          if (a[1] + d > l && a[1] <= l)
            if (a[2] <= l) ans++;
          a[1] += d;
          continue;
        }
        if (p == n) {
          if (a[n] + d > l && a[n] <= l)
            if (a[n - 1] <= l) ans++;
          a[n] += d;
          continue;
        }
        if (a[p - 1] > l && a[p + 1] > l && a[p] <= l && a[p] + d > l)
          ans--;
        else if (a[p - 1] <= l && a[p + 1] <= l && a[p] <= l && a[p] + d > l)
          ans++;
        a[p] += d;
      }
    }
  }
  return 0;
}
