#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, l;
  cin >> n >> m >> l;
  long long int a[n], ans = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  int flag = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > l) {
      if (flag == 0) {
        ans++;
        flag = 1;
      }
    } else
      flag = 0;
  }
  while (m--) {
    long long int x;
    cin >> x;
    if (x == 0) {
      cout << ans << endl;
    } else {
      int j, d;
      cin >> j >> d;
      j--;
      if (a[j] > l) {
        a[j] += d;
        continue;
      }
      a[j] += d;
      if (a[j] > l) {
        if (j == 0) {
          if (a[j + 1] <= l) ans++;
          if (n == 1) ans++;
          continue;
        }
        if (j == n - 1) {
          if (a[j - 1] <= l) ans++;
          continue;
        }
        if (a[j - 1] <= l && a[j + 1] <= l)
          ans++;
        else if (a[j - 1] > l && a[j + 1] > l)
          ans--;
      }
    }
  }
}
