#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2 * 1e5 + 10;
const int INF = 0x3f3f3f3f;
struct Tree {
  int l, r, len, sum[3];
};
Tree tree[MAXN << 2];
void PushUp(int o) {
  for (int i = 0; i < 3; i++) {
    tree[o].sum[i] = tree[o << 1].sum[i] + tree[o << 1 | 1].sum[i];
  }
}
void Build(int o, int l, int r) {
  tree[o].l = l;
  tree[o].r = r;
  tree[o].len = r - l + 1;
  for (int i = 0; i < 3; i++) {
    tree[o].sum[i] = 0;
  }
  if (l == r) return;
  int mid = (l + r) >> 1;
  Build(o << 1, l, mid);
  Build(o << 1 | 1, mid + 1, r);
}
int a, b;
void Update(int o, int pos, int v) {
  if (tree[o].l == tree[o].r) {
    int add = tree[o].sum[2] + v;
    tree[o].sum[0] = min(b, add);
    tree[o].sum[1] = min(a, add);
    tree[o].sum[2] = add;
    return;
  }
  int mid = (tree[o].l + tree[o].r) >> 1;
  if (pos <= mid)
    Update(o << 1, pos, v);
  else
    Update(o << 1 | 1, pos, v);
  PushUp(o);
}
int Query(int o, int L, int R, int op) {
  if (L > R) return 0;
  if (L == tree[o].l && R == tree[o].r) return tree[o].sum[op];
  int mid = (tree[o].l + tree[o].r) >> 1;
  if (R <= mid)
    return Query(o << 1, L, R, op);
  else if (L > mid)
    return Query(o << 1 | 1, L, R, op);
  else
    return Query(o << 1, L, mid, op) + Query(o << 1 | 1, mid + 1, R, op);
}
int main() {
  int n, k, q;
  cin >> n >> k >> a >> b >> q;
  Build(1, 1, n);
  while (q--) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      int d, a;
      scanf("%d%d", &d, &a);
      Update(1, d, a);
    } else {
      int p;
      scanf("%d", &p);
      cout << Query(1, 1, p - 1, 0) + Query(1, p + k, n, 1) << endl;
    }
  }
  return 0;
}
