#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)1e9 + 7;
long long n, m, k, a[100005], ans, x, y, z;
int main() {
  cin >> n >> m >> k;
  for (long long i = (long long)1; i < (long long)n + 1; i++) {
    cin >> a[i];
    if (i == 1 && a[i] > k)
      ans++;
    else if (a[i] > k && a[i - 1] <= k)
      ans++;
  }
  for (long long i = 0; i < (long long)m; i++) {
    cin >> x;
    if (x == 0)
      cout << ans << endl;
    else {
      cin >> y >> z;
      if (a[y] > k)
        a[y] += z;
      else if (y == 1 && a[y + 1] > k)
        a[y] += z;
      else if (y == n && a[y - 1] > k)
        a[y] += z;
      else if (a[y - 1] > k && a[y + 1] > k && a[y] + z > k) {
        ans--;
        a[y] += z;
      } else if (a[y - 1] > k || a[y + 1] > k) {
        a[y] += z;
      } else if (a[y] + z > k) {
        a[y] += z;
        ans++;
      } else
        a[y] += z;
    }
  }
  return 0;
}
