#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, l, s = 0;
  cin >> n >> m >> l;
  vector<int> a(n);
  vector<int> otvet;
  for (int i = 0; i < n; ++i) cin >> a[i];
  if (n == 1) {
    for (int i = 0; i < m; ++i) {
      int x;
      cin >> x;
      if (x == 0) {
        if (a[0] <= l)
          otvet.push_back(0);
        else
          otvet.push_back(1);
        continue;
      }
      int y, z;
      cin >> y >> z;
      if (a[0] <= l) a[0] += z;
    }
    for (int i = 0; i < otvet.size(); ++i) cout << otvet[i] << endl;
    return 0;
  }
  int i = 0;
  while (i < n) {
    if (a[i] <= l) {
      ++i;
      continue;
    }
    int j = i;
    while (a[j] > l && j < n) {
      j++;
    }
    s++;
    i = j;
  }
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    if (x == 0) {
      otvet.push_back(s);
      continue;
    }
    int y, z;
    cin >> y >> z;
    y--;
    if (a[y] > l) continue;
    a[y] += z;
    if (a[y] > l) {
      if (y > 0 && y < n - 1) {
        if (a[y - 1] <= l && a[y + 1] <= l)
          s++;
        else if (a[y - 1] > l && a[y + 1] > l) {
          s--;
        }
      } else if (y == 0) {
        if (a[y + 1] <= l) s++;
      } else if (y == n - 1) {
        if (a[y - 1] <= l) s++;
      }
    }
  }
  for (int i = 0; i < otvet.size(); ++i) cout << otvet[i] << endl;
  return 0;
}
