#include <bits/stdc++.h>
using namespace std;
vector<int> parent;
vector<int> Rank;
void add_element(int x) {
  parent.push_back(x);
  Rank.push_back(1);
}
int find_set(int x) {
  if (parent[x] == x) return x;
  parent[x] = find_set(parent[x]);
  return parent[x];
}
void join_elements(int x, int y) {
  int a = find_set(x);
  int b = find_set(y);
  if (a != b) {
    if (Rank[a] > Rank[b]) {
      parent[b] = a;
      Rank[a] += b;
    } else {
      parent[a] = b;
      Rank[b] += a;
    }
  }
}
int N, M, L;
long long A, B, C;
long long m[200000];
int main() {
  ios_base::sync_with_stdio();
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M >> L;
  int segment_count = 0;
  m[0] = -1;
  add_element(0);
  for (int i = 1; i <= N; ++i) {
    cin >> m[i];
    add_element(i);
    if (m[i] > L) {
      ++segment_count;
      if (m[i - 1] > L) {
        join_elements(i - 1, i);
        --segment_count;
      }
    }
  }
  add_element(N + 1);
  for (int i = 0; i < M; ++i) {
    cin >> A;
    if (A == 0)
      cout << segment_count << "\n";
    else {
      cin >> B >> C;
      if ((m[B] <= L) && (m[B] + C > L)) {
        m[B] += C;
        ++segment_count;
        if (m[B - 1] > L) {
          join_elements(B - 1, B);
          --segment_count;
        }
        if (m[B + 1] > L) {
          join_elements(B + 1, B);
          --segment_count;
        }
      } else
        m[B] += C;
    }
  }
  return 0;
}
