#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, l, q, num, ll;
  cin >> n >> m >> l;
  vector<long long> len(n);
  vector<bool> is_long(n, false);
  long long prev_long = 0;
  long long count = 0;
  bool was_long = false;
  for (long long i = 0; i < n; ++i) {
    cin >> len[i];
    if (len[i] > l) {
      if (!was_long) {
        ++count;
      }
      was_long = true;
      is_long[i] = true;
    } else {
      was_long = false;
    }
  }
  int c_merged;
  for (long long i = 0; i < m; ++i) {
    cin >> q;
    if (q == 1) {
      cin >> num >> ll;
      len[num - 1] += ll;
      if (len[num - 1] > l) {
        c_merged = 0;
        if (is_long[num - 1] == false) {
          if (num - 2 >= 0 && is_long[num - 2] == true) {
            c_merged++;
          }
          if (num < n && is_long[num] == true) {
            c_merged++;
          }
          if (c_merged == 2) {
            --count;
          }
          if (c_merged == 0) {
            ++count;
          }
        }
        is_long[num - 1] = true;
      }
    } else {
      cout << count << endl;
    }
  }
  return 0;
}
