#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y, long long int p) {
  long long int r = 1;
  x = x % p;
  while (y) {
    if (y & 1) r = r * x % p;
    y = y >> 1;
    x = x * x % p;
  }
  return r;
}
const int M = 1, N = 1e5 + 9;
const int maxn = N;
long long int par[maxn], rnk[maxn], a[N];
inline long long int find(int a) {
  return a == par[a] ? a : par[a] = find(par[a]);
}
inline void merge(int a, int b) {
  a = find(a), b = find(b);
  if (rnk[a] > rnk[b]) swap(a, b);
  par[a] = b;
  rnk[b] += rnk[a];
}
inline bool same(int a, int b) { return find(a) == find(b); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < maxn; i++) par[i] = i, rnk[i] = 1;
  long long int n, q, l, ct;
  cin >> n >> q >> l;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++)
    if (a[i] > l && a[i + 1] > l) merge(i, i + 1);
  set<long long int> st;
  for (int i = 0; i < n; i++)
    if (a[i] > l) st.insert(find(i));
  ct = st.size();
  while (q--) {
    int ch;
    cin >> ch;
    if (ch == 0) {
      cout << ct << endl;
      continue;
    }
    long long int i, v;
    cin >> i >> v;
    i--;
    a[i] += v;
    if (a[i] - v > l || a[i] <= l) continue;
    if (a[i] - v <= l && a[i] > l) ct++;
    if (!same(i, i + 1) && i != n - 1 && a[i + 1] > l) {
      merge(i, i + 1);
      ct--;
    }
    if (!same(i, i - 1) && i != 0 && a[i - 1] > l) {
      merge(i, i - 1);
      ct--;
    }
  }
}
