#include <bits/stdc++.h>
using namespace std;
long long arr[200200];
long long sgt[800800];
long long sgt1[800800];
int n, k;
long long a, b;
void update(int nd, int l, int r, int ind) {
  if (l == r) {
    sgt[nd] = min(b, arr[l]);
    sgt1[nd] = min(a, arr[l]);
    return;
  }
  int mid = (r + l) / 2;
  if (ind <= mid) {
    update(2 * nd, l, mid, ind);
  } else {
    update(2 * nd + 1, mid + 1, r, ind);
  }
  sgt[nd] = sgt[2 * nd + 1] + sgt[2 * nd];
  sgt1[nd] = sgt1[2 * nd + 1] + sgt1[2 * nd];
}
long long query(int nd, int l, int r, int s, int e) {
  if (s <= l && r <= e) {
    return sgt[nd];
  }
  long long ret = 0;
  int mid = (r + l) / 2;
  if (s <= mid) {
    ret += query(2 * nd, l, mid, s, e);
  }
  if (mid + 1 <= e) {
    ret += query(2 * nd + 1, mid + 1, r, s, e);
  }
  return ret;
}
long long query1(int nd, int l, int r, int s, int e) {
  if (s <= l && r <= e) {
    return sgt1[nd];
  }
  long long ret = 0;
  int mid = (r + l) / 2;
  if (s <= mid) {
    ret += query1(2 * nd, l, mid, s, e);
  }
  if (mid + 1 <= e) {
    ret += query1(2 * nd + 1, mid + 1, r, s, e);
  }
  return ret;
}
int q;
int main() {
  scanf("%d %d %I64d %I64d %d", &n, &k, &a, &b, &q);
  while (q--) {
    int ty;
    scanf("%d", &ty);
    if (ty == 1) {
      int ind, val;
      scanf("%d %d", &ind, &val);
      arr[ind] += val;
      update(1, 1, n, ind);
    } else {
      int st;
      scanf("%d", &st);
      long long ans = 0;
      if (st > 1) ans += query(1, 1, n, 1, st - 1);
      if (st + k <= n) ans += query1(1, 1, n, st + k, n);
      printf("%I64d\n", ans);
    }
  }
}
