#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("O2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long dx[4] = {1, -1, 0, 0};
long long dy[4] = {0, 0, 1, -1};
const long long MOD = 1e9 + 7;
long long fast_pow(long long a, long long b) {
  long long res = a, ret = 1;
  while (b > 0) {
    if (b % 2) ret = (ret * res) % MOD;
    res = (res * res) % MOD;
    b /= 2;
  }
  return ret;
}
const long long maxN = 1e5 + 7;
long long arr[maxN];
long long par[maxN];
long long sz;
long long siz[maxN];
long long getpar(long long x) {
  if (par[x] != x) {
    par[x] = getpar(par[x]);
  }
  return x;
}
void merge(long long a_par, long long b_par) {
  if (siz[a_par] < siz[b_par]) {
    par[a_par] = par[b_par];
    siz[b_par] += siz[a_par];
  } else {
    par[b_par] = par[a_par];
    siz[a_par] += siz[b_par];
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  time_t time_t1, time_t2;
  time_t1 = clock();
  long long t = 1;
  while (t--) {
    long long n, m, l;
    cin >> n >> m >> l;
    for (long long i = 1; i <= n; ++i) {
      cin >> arr[i];
      par[i] = -1;
    }
    par[0] = -1;
    for (long long i = 1; i <= n; ++i) {
      if (arr[i] > l) {
        par[i] = i;
        siz[i] = 1;
      }
    }
    for (long long i = 1; i < n; ++i) {
      if (par[i] != -1 and par[i + 1] != -1) {
        long long a_par = getpar(i);
        long long b_par = getpar(i + 1);
        merge(a_par, b_par);
      }
    }
    par[n + 1] = -1;
    sz = 0;
    for (long long i = 1; i <= n; ++i) {
      if (par[i] == i) {
        sz++;
      }
    }
    long long idx, inc;
    long long tp;
    while (m--) {
      cin >> tp;
      bool lef = false, rig = false;
      if (tp == 0) {
        cout << sz << '\n';
      } else {
        cin >> idx >> inc;
        long long al = arr[idx];
        arr[idx] += inc;
        if (al > l) {
          continue;
        }
        if (arr[idx] <= l) {
          continue;
        }
        if (arr[idx] > l) {
          par[idx] = idx;
          if (par[idx - 1] != -1) {
            lef = true;
            long long a_par = getpar(idx);
            long long b_par = getpar(idx - 1);
            merge(a_par, b_par);
          }
          if (par[idx + 1] != -1) {
            rig = true;
            long long a_par = getpar(idx);
            long long b_par = getpar(idx + 1);
            merge(a_par, b_par);
          }
        }
        if (lef and rig) {
          sz--;
        } else if (lef == false and rig == false) {
          sz++;
        }
      }
    }
  }
  time_t2 = clock();
  return 0;
}
