#include <bits/stdc++.h>
using namespace std;
const int maxx = 800010;
const double pi = acos(-1.0);
const double eps = 1e-15;
long long t, n, m, k, a, b, q, a1, a2, a3;
long long ans = 0, total = 0, sum = 0, cnt = 0;
long long d[maxx], bj[maxx];
struct node {
  long long l;
  long long r;
  long long valx;
  long long valy;
} tree[maxx];
void pushup(long long p) {
  tree[p].valx = tree[p << 1].valx + tree[p << 1 | 1].valx;
  tree[p].valy = tree[p << 1].valy + tree[p << 1 | 1].valy;
}
void build(long long p, long long l, long long r) {
  tree[p].l = l, tree[p].r = r;
  long long mid = (l + r) >> 1;
  if (l == r) return;
  build(p << 1, l, mid);
  build(p << 1 | 1, mid + 1, r);
  pushup(p);
}
void update(long long p, long long c) {
  long long l = tree[p].l, r = tree[p].r;
  long long mid = (l + r) >> 1;
  if (l == r) {
    tree[p].valx = min(a, bj[l]);
    tree[p].valy = min(b, bj[l]);
    return;
  }
  if (c <= mid)
    update(p << 1, c);
  else
    update(p << 1 | 1, c);
  pushup(p);
}
long long query(long long p, long long L, long long R, long long opt) {
  if (L > R) return 0;
  long long l = tree[p].l, r = tree[p].r;
  if (L <= l && R >= r) {
    if (opt)
      return tree[p].valx;
    else
      return tree[p].valy;
  }
  long long res = 0, mid = (l + r) >> 1;
  if (L <= mid) res += query(p << 1, L, R, opt);
  if (R > mid) res += query(p << 1 | 1, L, R, opt);
  return res;
}
int main() {
  scanf("%lld%lld%lld%lld%lld", &n, &k, &a, &b, &q);
  build(1, 1, n);
  for (register int i = 1; i <= q; i++) {
    scanf("%lld", &a1);
    if (a1 == 1) {
      scanf("%lld%lld", &a2, &a3);
      bj[a2] += a3;
      update(1, a2);
    } else {
      scanf("%lld", &a2);
      long long u1 = query(1, 1, a2 - 1, 0), u2 = query(1, a2 + k, n, 1);
      ans = u1 + u2;
      printf("%lld\n", ans);
    }
  }
  return 0;
}
