#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, i, e, f, g, n, m, k, l, A[100005], fix[100005], ans;
int main() {
  cin >> n >> m >> l;
  for (i = 1; i <= n; i++) {
    cin >> A[i];
    if (A[i] > l) {
      fix[i] = 1;
      if (fix[i - 1] == 1 && fix[i + 1] == 1)
        ans--;
      else if (fix[i - 1] == 1 || fix[i + 1] == 1)
        continue;
      else
        ans++;
    }
  }
  for (i = 1; i <= m; i++) {
    cin >> a;
    if (a == 1) {
      cin >> b >> c;
      if (A[b] > l) continue;
      A[b] += c;
      if (A[b] > l) {
        fix[b] = 1;
        if (fix[b - 1] == 1 && fix[b + 1] == 1)
          ans--;
        else if (fix[b - 1] == 1 || fix[b + 1] == 1)
          continue;
        else
          ans++;
      }
    } else
      cout << ans << endl;
  }
}
