#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
const long long INF = 1011111111;
const long long LLINF = 1000111000111000111LL;
const long double EPS = 1e-10;
const long double PI = 3.14159265358979323;
using namespace std;
long long powm(long long base, long long exp, long long mod = MOD) {
  long long ans = 1;
  while (exp) {
    if (exp & 1) ans = (ans * base) % mod;
    exp >>= 1, base = (base * base) % mod;
  }
  return ans;
}
const long long N = 1000005;
long long a[N], mk[N];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, l, type, p, d;
  cin >> n >> m >> l;
  long long ans = 0;
  for (long long i = 1; i < n + 1; i++) cin >> a[i];
  for (long long i = 1; i < n + 1; i++)
    if (a[i] > l) mk[i] = 1;
  for (long long i = 1; i < n + 1; i++)
    if (mk[i] and !mk[i - 1]) ans++;
  while (m--) {
    cin >> type;
    if (type == 0) {
      cout << ans << '\n';
    } else {
      cin >> p >> d;
      if (mk[p]) continue;
      a[p] += d;
      if (a[p] > l) {
        mk[p] = 1;
        if (mk[p - 1] == 0 and mk[p + 1] == 0) {
          ans++;
        } else if (mk[p - 1] + mk[p + 1] == 1) {
          continue;
        } else {
          ans--;
        }
      }
    }
  }
  return 0;
}
