#include <bits/stdc++.h>
using namespace std;
const int maxn = 200200;
long long sum1[maxn << 2], sum2[maxn << 2], a, b;
int n, k, q;
void PushUP(int rt) {
  sum1[rt] = (sum1[rt << 1] + sum1[rt << 1 | 1]);
  sum2[rt] = (sum2[rt << 1] + sum2[rt << 1 | 1]);
}
void update(int p, long long add, int l, int r, int rt) {
  if (l == r) {
    sum1[rt] += add;
    sum1[rt] = min(sum1[rt], b);
    sum2[rt] += add;
    sum2[rt] = min(sum2[rt], a);
    return;
  }
  int m = (l + r) >> 1;
  if (p <= m)
    update(p, add, l, m, rt << 1);
  else
    update(p, add, m + 1, r, rt << 1 | 1);
  PushUP(rt);
}
long long query1(int L, int R, int l, int r, int rt) {
  if (L > R) return 0;
  if (L <= l && r <= R) {
    return sum1[rt];
  }
  int m = (l + r) >> 1;
  long long ret = 0;
  if (L <= m) ret += query1(L, R, l, m, rt << 1);
  if (m < R) ret += query1(L, R, m + 1, r, rt << 1 | 1);
  return ret;
}
long long query2(int L, int R, int l, int r, int rt) {
  if (L > R) return 0;
  if (L <= l && r <= R) {
    return sum2[rt];
  }
  int m = (l + r) >> 1;
  long long ret = 0;
  if (L <= m) ret += query2(L, R, l, m, rt << 1);
  if (m < R) ret += query2(L, R, m + 1, r, rt << 1 | 1);
  return ret;
}
int main() {
  while (scanf("%d%d%I64d%I64d%d", &n, &k, &a, &b, &q) != EOF) {
    memset(sum1, 0, sizeof(sum1));
    memset(sum2, 0, sizeof(sum2));
    while (q--) {
      int tag, pos, add;
      scanf("%d", &tag);
      if (tag == 1) {
        scanf("%d%d", &pos, &add);
        update(pos, add, 1, n, 1);
      } else {
        scanf("%d", &pos);
        long long ans =
            query1(1, pos - 1, 1, n, 1) + query2(pos + k, n, 1, n, 1);
        printf("%I64d\n", ans);
      }
    }
  }
}
