#include <bits/stdc++.h>
using namespace std;
long long n, m, l, a[100002], ans, p, d;
signed main() {
  cin >> n >> m >> l;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++)
    if (a[i] > l && a[i - 1] <= l) ans++;
  for (long long i = 1; i <= m; i++) {
    long long type;
    cin >> type;
    if (!type)
      cout << ans << "\n";
    else {
      cin >> p >> d;
      if (a[p] <= l && a[p] + d > l) {
        if (a[p - 1] <= l && a[p + 1] <= l) ans++;
        if (a[p - 1] > l && a[p + 1] > l) ans--;
      }
      a[p] += d;
    }
  }
}
