#include <bits/stdc++.h>
using namespace std;
int N, K, first, second, Q;
int asum[200005 * 4];
int bsum[200005 * 4];
void upd(int cur, int a, int b, int pos, int v) {
  if (a > b) return;
  if ((a > pos) || (b < pos)) return;
  if (a == b) {
    asum[cur] = min(first, asum[cur] + v);
    bsum[cur] = min(second, bsum[cur] + v);
    return;
  }
  int md = (a + b) / 2;
  upd(cur * 2, a, md, pos, v);
  upd(cur * 2 + 1, md + 1, b, pos, v);
  asum[cur] = asum[cur * 2] + asum[cur * 2 + 1];
  bsum[cur] = bsum[cur * 2] + bsum[cur * 2 + 1];
}
int qry(int cur, int a, int b, int lq, int rq, int t) {
  if (a > b) return 0;
  if (lq > rq) return 0;
  if ((a > rq) || (b < lq)) return 0;
  if ((lq <= a) && (rq >= b)) {
    if (t == 1) return asum[cur];
    if (t == 0) return bsum[cur];
  }
  int md = (a + b) / 2;
  return (qry(cur * 2, a, md, lq, rq, t) +
          qry(cur * 2 + 1, md + 1, b, lq, rq, t));
}
int main(void) {
  memset(asum, 0, sizeof(asum));
  memset(bsum, 0, sizeof(bsum));
  cin >> N >> K >> first >> second >> Q;
  for (int i = 0; i < Q; i++) {
    int a, b, c;
    cin >> a;
    if (a == 1) {
      cin >> b >> c;
      upd(1, 1, N, b, c);
    }
    if (a == 2) {
      cin >> b;
      int lft = b - 1;
      int rt = b + K;
      int res = qry(1, 1, N, 0, lft, 0);
      res = res + qry(1, 1, N, rt, N, 1);
      cout << res << endl;
    }
  }
}
