#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10, inf = 1e9 + 10, P = 53, MOD = 1e9 + 7;
int n, a, b, k, q, seg1[4 * maxn], seg2[4 * maxn];
inline void update(int ind) {
  seg1[ind] = seg1[((ind) * (2))] + seg1[(((ind) * (2)) + 1)];
  seg2[ind] = seg2[((ind) * (2))] + seg2[(((ind) * (2)) + 1)];
}
void add(int s, int e, int ind, int l, int r, int x) {
  if (s >= r || e <= l) return;
  if (s >= l && e <= r) {
    seg1[ind] += x;
    seg2[ind] += x;
    seg1[ind] = min(seg1[ind], b);
    seg2[ind] = min(seg2[ind], a);
    return;
  }
  int mid = (s + e) / 2;
  add(s, mid, ((ind) * (2)), l, r, x);
  add(mid, e, (((ind) * (2)) + 1), l, r, x);
  update(ind);
}
int query(int type, int s, int e, int ind, int l, int r) {
  if (s >= r || e <= l) return 0;
  if (s >= l && e <= r) {
    if (type == 1)
      return seg1[ind];
    else
      return seg2[ind];
  }
  int mid = (s + e) / 2;
  return query(type, s, mid, ((ind) * (2)), l, r) +
         query(type, mid, e, (((ind) * (2)) + 1), l, r);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k >> a >> b >> q;
  while (q--) {
    int type, l, x;
    cin >> type;
    if (type == 1) {
      cin >> l >> x;
      add(0, n, 1, l - 1, l, x);
    } else {
      cin >> x;
      x--;
      cout << query(1, 0, n, 1, 0, x) + query(2, 0, n, 1, x + k, n) << endl;
    }
  }
  return 0;
}
