#include <bits/stdc++.h>
using namespace std;
long long arr[100002];
int main() {
  int n, m, l;
  cin >> n >> m >> l;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (arr[i] > l) {
      while (i <= n && arr[i] > l) i++;
      cnt++;
    }
  }
  while (m--) {
    int cmd;
    cin >> cmd;
    if (cmd == 0) {
      cout << cnt << '\n';
    } else {
      int p, d;
      cin >> p >> d;
      if (arr[p] <= l && arr[p] + d > l) {
        if (arr[p - 1] > l && arr[p + 1] > l)
          cnt--;
        else if (arr[p - 1] <= l && arr[p + 1] <= l)
          cnt++;
      }
      arr[p] += d;
    }
  }
  return 0;
}
