#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const double PI = 3.141592653589793238462643383279502884;
const double EPS = 1e-9;
int main() {
  long long n, m, l;
  cin >> n >> m >> l;
  vector<long long> a(100001);
  vector<bool> b(100001);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i] > l;
  }
  long long count = 0;
  if (b[0]) {
    count++;
  }
  for (int i = 1; i < n; i++) {
    if (b[i] && !b[i - 1]) {
      count++;
    }
  }
  for (int j = 0; j < m; j++) {
    int t;
    cin >> t;
    if (t == 0) {
      cout << count << endl;
    } else {
      long long p, d;
      cin >> p >> d;
      long long prevLength = a[p - 1];
      a[p - 1] += d;
      if (prevLength <= l && a[p - 1] > l) {
        b[p - 1] = true;
        if (p == 1) {
          if (!b[1]) {
            count += 1;
          }
        } else if (p == n) {
          if (!b[n - 2]) {
            count += 1;
          }
        } else {
          if (b[p - 2] && b[p]) {
            count -= 1;
          } else if (!b[p - 2] && !b[p]) {
            count += 1;
          }
        }
      }
    }
  }
  cout << endl;
  return 0;
}
