#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-9;
long long Power(long long a, long long b) {
  if (b == 0) return 1;
  long long p = Power(a, b / 2);
  p = (p * p);
  if (b & 1) {
    p = (p * a);
  }
  return p;
}
long long Gcd(long long a, long long b) {
  if (b == 0) return a;
  if (a < b) return Gcd(b, a);
  return Gcd(b, a % b);
}
void Solve() {
  int n, m;
  long long l;
  cin >> n >> m >> l;
  vector<long long> arr(n), seg(n, -1);
  for (int i = 0; i < n; i++) cin >> arr[i];
  int curr = 0, prev = -1;
  for (int i = 0; i < n; i++) {
    if (arr[i] > l) {
      seg[i] = 0;
      if (prev == -1) {
        curr++;
      }
      prev = 0;
    } else {
      prev = -1;
      seg[i] = -1;
    }
  }
  while (m--) {
    int t;
    cin >> t;
    if (t == 0) {
      cout << curr << '\n';
    } else {
      int p;
      long long d;
      cin >> p >> d;
      p--;
      arr[p] += d;
      if (seg[p] == -1 && arr[p] > l) {
        seg[p] = 0;
        if (p == 0) {
          if (p + 1 < n && seg[p + 1] == -1) {
            curr++;
          } else if (n == 1) {
            curr++;
          }
        } else if (p == n - 1) {
          if (p - 1 >= 0 && seg[p - 1] == -1) {
            curr++;
          } else if (n == 1) {
            curr++;
          }
        } else {
          if (seg[p - 1] == 0 && seg[p + 1] == 0) {
            curr--;
          } else if (seg[p - 1] == -1 && seg[p + 1] == -1) {
            curr++;
          }
        }
      }
    }
  }
}
int main() {
  int t = 1;
  while (t--) {
    Solve();
  }
  return 0;
}
