#include <bits/stdc++.h>
using namespace std;
long long int input[300010];
long long int n, k, a, b, q;
struct Tree_Node {
  long long int maxi;
  long long int mini;
} tree[4 * 300010 + 5];
void build(long long int node, long long int st, long long int en) {
  if (st == en) {
    if (input[st] > a)
      tree[node].maxi = a;
    else
      tree[node].maxi = input[st];
    if (input[st] > b)
      tree[node].mini = b;
    else
      tree[node].mini = input[st];
  } else {
    long long int mid = (st + en) / 2;
    build(2 * node, st, mid);
    build(2 * node + 1, mid + 1, en);
    tree[node].mini = tree[2 * node].mini + tree[2 * node + 1].mini;
    tree[node].maxi = tree[2 * node].maxi + tree[2 * node + 1].maxi;
  }
}
void update(long long int node, long long int st, long long int en,
            long long int in, long long int x) {
  if (st == en) {
    long long int m = tree[node].maxi;
    long long int n = tree[node].mini;
    m += x;
    n += x;
    if (m > a)
      tree[node].maxi = a;
    else
      tree[node].maxi = m;
    if (n > b)
      tree[node].mini = b;
    else
      tree[node].mini = n;
  } else {
    long long int mid = (st + en) / 2;
    if (st <= in && in <= mid)
      update(2 * node, st, mid, in, x);
    else
      update(2 * node + 1, mid + 1, en, in, x);
    tree[node].mini = tree[2 * node].mini + tree[2 * node + 1].mini;
    tree[node].maxi = tree[2 * node].maxi + tree[2 * node + 1].maxi;
  }
}
long long int query(long long int node, long long int st, long long int en,
                    long long int l, long long int r, long long int type) {
  if (l <= st && en <= r && type == 1)
    return tree[node].maxi;
  else if (l <= st && en <= r && type == 0)
    return tree[node].mini;
  else if (r < st || en < l)
    return 0;
  else {
    long long int mid = (st + en) / 2;
    return query(2 * node, st, mid, l, r, type) +
           query(2 * node + 1, mid + 1, en, l, r, type);
  }
}
int main() {
  cin >> n >> k >> a >> b >> q;
  long long int in, x, type;
  while (q--) {
    cin >> type;
    if (type == 1) {
      cin >> in >> x;
      update(1, 1, n, in, x);
    } else {
      cin >> in;
      cout << query(1, 1, n, 1, in - 1, 0) + query(1, 1, n, in + k, n, 1)
           << endl;
    }
  }
  return 0;
}
