#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 7;
int n, m, length;
long long int line[N];
int main() {
  ios::sync_with_stdio(false);
  cout.tie(nullptr);
  cin.tie(nullptr);
  cin >> n >> m >> length;
  for (int i = 1; i <= n; ++i) cin >> line[i];
  int swing = 0;
  for (int i = 1; i <= n; ++i)
    if (line[i] > length && line[i - 1] <= length) ++swing;
  for (int query = 1; query <= m; ++query) {
    int type;
    cin >> type;
    if (type == 0)
      cout << swing << "\n";
    else {
      int p, value;
      cin >> p >> value;
      if (line[p] <= length && line[p] + value > length) {
        if (line[p + 1] > length) --swing;
        if (line[p - 1] <= length) ++swing;
      }
      line[p] += value;
    }
  }
  return 0;
}
