#include <bits/stdc++.h>
using namespace std;
vector<string> split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cerr << it->substr((*it)[0] == ' ', it->length()) << " = " << a << '\t';
  err(++it, args...);
}
const long double eps = 1e-9;
const long long mod = 1e9 + 7;
pair<long long, long long> dir[8] = {{-1, 0}, {1, 0},   {0, -1}, {0, 1},
                                     {1, 1},  {-1, -1}, {-1, 1}, {1, -1}};
const long long nn = 2e5 + 5;
void robin() {
  long long n, m, l, cnt = 0;
  cin >> n >> m >> l;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    if (a[i] > l) {
      long long j = i;
      while (j < n && a[j] > l) j++;
      i = j;
      cnt++;
    }
  }
  while (m--) {
    long long t;
    cin >> t;
    if (t == 0) {
      cout << cnt << "\n";
    } else {
      long long id, d;
      cin >> id >> d;
      id--;
      long long prev = a[id];
      a[id] += d;
      if (prev > l) continue;
      if (a[id] > l) {
        if ((id >= 1 && a[id - 1] > l) && (id <= n - 2 && a[id + 1] > l) &&
            prev <= l) {
          cnt--;
          continue;
        }
        if (id >= 1 && a[id - 1] > l) continue;
        if (id <= n - 2 && a[id + 1] > l) continue;
        cnt++;
      }
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long T = 1;
  for (long long tc = 1; tc <= T; tc++) {
    robin();
  }
  return 0;
}
