#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int MAXN = 1e6 + 5, inf = 1e9;
const ll INF = 1e18;
const ld PI = 3.1415926535897932384626433832795;
int cnt[MAXN];
ll dp[MAXN], tab[MAXN];
bool vis[MAXN], used[MAXN];
vector<int> G[MAXN];
vector<ll> V;
set<ll> S;
map<ll, int> M;
stack<ll> St;
queue<ll> Q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << setprecision(13) << fixed;
  int n, m, l;
  cin >> n >> m >> l;
  bool ok = 0;
  int res = 0;
  for (int i = 1; i <= n; i++) {
    cin >> tab[i];
    if (tab[i] > l) {
      if (ok) continue;
      ok = 1;
      res++;
    } else
      ok = 0;
  }
  for (int i = 0; i < m; i++) {
    int co;
    cin >> co;
    if (co == 0) {
      cout << res << "\n";
    } else {
      int p, d;
      cin >> p >> d;
      if (tab[p] > l) continue;
      tab[p] += d;
      if (tab[p] <= l) continue;
      if (tab[p - 1] > l and tab[p + 1] > l)
        res--;
      else if (tab[p - 1] <= l and tab[p + 1] <= l)
        res++;
    }
  }
}
