#include <bits/stdc++.h>
using namespace std;
const long long int INF = 10000000;
const int N = 100005;
const long long int mod = 1000000007;
vector<int> lst[N];
int parent[N];
bool used[N] = {0};
int cnt = 0;
void make_set(int v) {
  lst[v] = vector<int>(1, v);
  parent[v] = v;
  cnt++;
}
int find_set(int v) { return parent[v]; }
void union_sets(int a, int b) {
  a = find_set(a);
  b = find_set(b);
  if (a != b) {
    cnt--;
    if (lst[a].size() < lst[b].size()) swap(a, b);
    while (!lst[b].empty()) {
      int v = lst[b].back();
      lst[b].pop_back();
      parent[v] = a;
      lst[a].push_back(v);
    }
  }
}
void solve() {
  long long int n, m, l;
  cin >> n >> m >> l;
  ;
  vector<long long int> d(n + 2);
  for (int i = 1; i <= n; i++) {
    cin >> d[i];
    if (d[i] > l) {
      used[i] = 1;
      make_set(i);
      if (d[i - 1] > l) {
        union_sets(i - 1, i);
      }
    }
  }
  long long int t, x, y;
  for (int i = 0; i < (m); i++) {
    cin >> t;
    if (t == 0) {
      cout << cnt << endl;
    } else {
      cin >> x >> y;
      d[x] += y;
      if (used[x]) continue;
      if (d[x] > l) {
        used[x] = 1;
        make_set(x);
        if (d[x - 1] > l) {
          union_sets(x - 1, x);
        }
        if (d[x + 1] > l) {
          union_sets(x + 1, x);
        }
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  int t = 1;
  while (t--) {
    solve();
  }
}
