#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, l;
  cin >> n >> m >> l;
  int a[n + 2];
  for (long long int i = 1; i < n + 1; i++) cin >> a[i];
  a[0] = a[n + 1] = -1;
  int cmd, x, y;
  int ans = 0;
  for (long long int i = 1; i < n + 1; i++) {
    if (a[i] > l && a[i - 1] <= l) ans++;
  }
  for (long long int i = 0; i < m; i++) {
    cin >> cmd;
    if (cmd) {
      cin >> x >> y;
      if (a[x] > l)
        continue;
      else if (a[x] + y <= l)
        a[x] += y;
      else {
        if (a[x - 1] > l && a[x + 1] > l)
          ans--;
        else if (a[x - 1] <= l && a[x + 1] <= l)
          ans++;
        a[x] += y;
      }
    } else {
      cout << ans << endl;
    }
  }
  return 0;
}
