#include <bits/stdc++.h>
using namespace std;
long long INF = 1e9;
const int MAX = 1e5 + 7, N = 1e5 + 3;
double pi = acos(-1);
long long r, l, k, m, n, ans;
long long hair[100100];
bool seg[100100];
int main() {
  cin >> n >> m >> l;
  for (int i = 1; i <= n; i++) {
    cin >> hair[i];
    if (hair[i] > l) {
      seg[i] = true;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (seg[i] == 1 and seg[i - 1] == 0) {
      ans++;
    }
  }
  bool task;
  long long p, d;
  for (int i = 0; i < m; i++) {
    cin >> task;
    if (task == 0) {
      cout << ans << endl;
    } else {
      cin >> p >> d;
      if (seg[p]) {
        continue;
      } else {
        hair[p] += d;
        if (hair[p] > l) {
          seg[p] = true;
          if (seg[p - 1] == 0 and seg[p + 1] == 0) {
            ans++;
          } else if ((seg[p - 1] == 1 and seg[p + 1] == 1)) {
            ans--;
          }
        }
      }
    }
  }
  return 0;
}
