#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double pi = acos(-1.0);
const double eps = 1e-9;
int n, k, a, b, q, op, pos, val;
int fa[4 * 200100], fb[4 * 200100];
void upd(int v, int l, int r, int pos, int val) {
  if (l == r) {
    fa[v] = min(a, fa[v] + val);
    fb[v] = min(b, fb[v] + val);
    return;
  }
  int tm = (l + r) / 2;
  if (pos <= tm)
    upd(v + v, l, tm, pos, val);
  else
    upd(v + v + 1, tm + 1, r, pos, val);
  fa[v] = fa[v + v] + fa[v + v + 1];
  fb[v] = fb[v + v] + fb[v + v + 1];
}
int geta(int v, int l, int r, int x, int y) {
  if (y < l || r < x) return 0;
  if (x <= l && r <= y) return fa[v];
  int tm = (l + r) / 2;
  return geta(v + v, l, tm, x, y) + geta(v + v + 1, tm + 1, r, x, y);
}
int getb(int v, int l, int r, int x, int y) {
  if (y < l || r < x) return 0;
  if (x <= l && r <= y) return fb[v];
  int tm = (l + r) / 2;
  return getb(v + v, l, tm, x, y) + getb(v + v + 1, tm + 1, r, x, y);
}
int main() {
  scanf("%d%d%d%d%d", &n, &k, &a, &b, &q);
  for (int i = 1; i <= q; i++) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d%d", &pos, &val);
      upd(1, 1, n, pos, val);
    } else {
      scanf("%d", &pos);
      int res = getb(1, 1, n, 1, pos - 1) + geta(1, 1, n, pos + k, n);
      printf("%d\n", res);
    }
  }
  return 0;
}
