#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  bool vis[100005];
  int n, m, t;
  long long l, a[100005], ans = 0, x, y;
  memset(vis, 0, sizeof vis);
  cin >> n >> m >> l;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > l) {
      vis[i] = 1;
      ans++;
      if (vis[i - 1] == 1) ans--;
      if (vis[i + 1] == 1) ans--;
    }
  }
  for (int i = 1; i <= m; i++) {
    cin >> t;
    if (t == 0)
      cout << ans << "\n";
    else {
      cin >> x >> y;
      if (!vis[x]) {
        a[x] += y;
        if (a[x] > l) {
          ans++;
          vis[x] = 1;
          if (vis[x - 1] == 1) ans--;
          if (vis[x + 1] == 1) ans--;
        }
      }
    }
  }
  return 0;
}
