#include <bits/stdc++.h>
using namespace std;
double PI = 3.141592653589793;
const double EPS = 1e-9;
const int N = 1e6 + 5;
const long long mod = 1e9 + 7;
const int oo = 1e9;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
int n, m;
long long l;
long long t[N];
int main() {
  scanf("%d%d%lld", &n, &m, &l);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (t[i] <= l) continue;
    ans++;
    while (i <= n && t[i] > l) i++;
  }
  while (m--) {
    int type;
    scanf("%d", &type);
    if (type == 0) {
      printf("%d\n", ans);
    } else {
      int a;
      long long b;
      scanf("%d%lld", &a, &b);
      if (t[a] > l || t[a] + b <= l) {
        t[a] += b;
        continue;
      }
      t[a] += b;
      if (t[a - 1] > l && t[a + 1] > l) {
        ans--;
      } else if (t[a - 1] <= l && t[a + 1] <= l)
        ans++;
    }
  }
}
