#include <bits/stdc++.h>
using namespace std;
const double PAI = acos(-1.0);
int A[200005];
int tree1[200005 * 4];
int tree2[200005 * 4];
int a, b, n;
void build(int l, int r, int index) {
  tree1[index] = 0;
  tree2[index] = 0;
  int mid = (l + r) / 2;
  if (l == r) return;
  build(l, mid, index * 2);
  build(mid + 1, r, index * 2 + 1);
}
void Push_up1(int index) {
  tree1[index] = tree1[index * 2] + tree1[index * 2 + 1];
}
void Push_up2(int index) {
  tree2[index] = tree2[index * 2] + tree2[index * 2 + 1];
}
void insert(int l, int r, int x, int val, int index) {
  if (l == r && l == x) {
    tree1[index] += val;
    tree1[index] = min(tree1[index], a);
    tree2[index] += val;
    tree2[index] = min(tree2[index], b);
    return;
  }
  int mid = (l + r) / 2;
  if (x > mid)
    insert(mid + 1, r, x, val, index * 2 + 1);
  else
    insert(l, mid, x, val, index * 2);
  Push_up1(index);
  Push_up2(index);
}
int query(int l, int r, int left, int right, int t, int index) {
  if (left > n || right == 0) return 0;
  if (left <= l && r <= right) {
    if (t == 1)
      return tree1[index];
    else
      return tree2[index];
  }
  int mid = (l + r) / 2;
  int ans = 0;
  if (left <= mid) ans += query(l, mid, left, right, t, index * 2);
  if (right > mid) ans += query(mid + 1, r, left, right, t, index * 2 + 1);
  return ans;
}
int main() {
  int k, q, i, x, y;
  scanf("%d%d%d%d%d", &n, &k, &a, &b, &q);
  build(1, n, 1);
  for (i = 1; i <= q; ++i) {
    scanf("%d", &x);
    if (x == 1) {
      scanf("%d%d", &x, &y);
      insert(1, n, x, y, 1);
    } else {
      scanf("%d", &x);
      printf("%d\n", query(1, n, 1, x - 1, 2, 1) + query(1, n, x + k, n, 1, 1));
    }
  }
  return 0;
}
