#include <bits/stdc++.h>
using namespace std;
long long cul, que, len, x, y, z, trig = 0, old = -1;
map<long long, long long> m, an;
map<long long, long long>::iterator it;
bool vis[1000000];
void primaryjob() {
  memset((vis), (false), sizeof((vis)));
  ;
  for (long long int i = (long long int)1; i <= cul; i++) {
    if (m[i] > len) {
      vis[i] = true;
    }
  }
  old = 0;
  for (long long int i = (long long int)1; i <= cul; i++) {
    if (vis[i]) {
      old++;
      while (vis[i + 1] == vis[i]) {
        i++;
      }
    }
  }
}
int main() {
  scanf("%lld %lld %lld", &cul, &que, &len);
  for (long long int i = (long long int)0; i < cul; i++) {
    scanf("%lld", &x);
    m[i + 1] = x;
  }
  primaryjob();
  for (long long int i = (long long int)0; i < que; i++) {
    scanf("%lld", &x);
    if (x) {
      scanf("%lld %lld", &y, &z);
      trig = 0;
      if (m[y] > len) {
        trig = 1;
      }
      m[y] = m[y] + z;
      if (trig and m[y] > len)
        trig = 0;
      else if (!trig and m[y] > len)
        trig = 1;
      if (trig) {
        vis[y] = true;
        if (vis[y - 1] and vis[y + 1]) old--;
        if (!vis[y - 1] and !vis[y + 1]) old++;
      }
    } else {
      printf("%lld\n", old);
    }
  }
}
