#include <bits/stdc++.h>
using namespace std;
long long a, b;
long long S1[1000100], S2[1000100];
void build(int R, int l, int r) {
  if (l == r)
    S1[R] = S2[R] = 0;
  else {
    int m = (l + r) >> 1;
    build(R << 1, l, m);
    build(R << 1 | 1, m + 1, r);
    S1[R] = S2[R] = 0;
  }
}
void update(int R, int l, int r, int p, long long v) {
  if (r < p || l > p) return;
  if (l == r) {
    S1[R] = min(S1[R] + v, b);
    S2[R] = min(S2[R] + v, a);
    return;
  }
  int m = (l + r) >> 1;
  update(R << 1, l, m, p, v);
  update(R << 1 | 1, m + 1, r, p, v);
  S1[R] = S1[R << 1] + S1[R << 1 | 1];
  S2[R] = S2[R << 1] + S2[R << 1 | 1];
}
long long query1(int R, int l, int r, int p) {
  if (l > p) return 0;
  if (r <= p) return S1[R];
  int m = (l + r) >> 1;
  return query1(R << 1, l, m, p) + query1(R << 1 | 1, m + 1, r, p);
}
long long query2(int R, int l, int r, int p) {
  if (r < p) return 0;
  if (l >= p) return S2[R];
  int m = (l + r) >> 1;
  return query2(R << 1, l, m, p) + query2(R << 1 | 1, m + 1, r, p);
}
int main() {
  int n, k, q;
  scanf("%d%d", &n, &k);
  scanf("%lld%lld", &a, &b);
  scanf("%d", &q);
  build(1, 0, n - 1);
  for (int(i) = (0); (i) < (q); ++(i)) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int p, v;
      scanf("%d%d", &p, &v);
      update(1, 0, n - 1, p - 1, v);
    } else {
      int p;
      scanf("%d", &p);
      printf("%lld\n",
             query1(1, 0, n - 1, p - 2) + query2(1, 0, n - 1, p - 1 + k));
    }
  }
  return 0;
}
