#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, m, q, p;
  long long int arr[100005], d, l;
  cin >> n >> m >> l;
  for (int i = 0; i < n; i++) cin >> arr[i];
  int cur_cut = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] > l) {
      cur_cut++;
      while (arr[i] > l && i < n) i++;
      i--;
    }
  }
  for (int i = 0; i < m; i++) {
    cin >> q;
    if (q == 0)
      cout << cur_cut << "\n";
    else {
      cin >> p >> d;
      if (arr[p - 1] > l || arr[p - 1] + d <= l)
        arr[p - 1] += d;
      else {
        arr[p - 1] += d;
        if (p == 1) {
          if (arr[p] <= l) cur_cut++;
        } else if (p == n) {
          if (arr[p - 2] <= l) cur_cut++;
        } else if (arr[p] > l && arr[p - 2] > l)
          cur_cut--;
        else if (arr[p] <= l && arr[p - 2] <= l) {
          cur_cut++;
        }
      }
    }
  }
}
