#include <bits/stdc++.h>
using namespace std;
pair<int, int> t[4 * 200005];
int a, b, n, k, q;
void update(int v, int L, int R, int val, int pos) {
  if (L == R) {
    t[v].first = min(t[v].first + val, a);
    t[v].second = min(t[v].second + val, b);
    return;
  }
  int m = (R + L) / 2;
  if (pos <= m) {
    update(v * 2, L, m, val, pos);
  } else
    update(v * 2 + 1, m + 1, R, val, pos);
  t[v].first = t[v * 2].first + t[v * 2 + 1].first;
  t[v].second = t[v * 2].second + t[v * 2 + 1].second;
}
pair<int, int> sum(int v, int L, int R, int l, int r) {
  if (l > R || r < L) {
    return make_pair(0, 0);
  }
  if (l == L && r == R) {
    return t[v];
  }
  int m = (R + L) / 2;
  pair<int, int> lSum = sum(v * 2, L, m, l, min(m, r));
  pair<int, int> rSum = sum(v * 2 + 1, m + 1, R, max(l, m + 1), r);
  pair<int, int> res =
      make_pair(lSum.first + rSum.first, lSum.second + rSum.second);
  return res;
}
int main() {
  cin >> n >> k >> a >> b >> q;
  for (int i = 0; i < q; i++) {
    int x, y, z;
    cin >> x;
    if (x == 1) {
      cin >> y >> z;
      update(1, 0, n - 1, z, y - 1);
    } else {
      cin >> y;
      cout << sum(1, 0, n - 1, 0, y - 2).second +
                  sum(1, 0, n - 1, y + k - 1, n - 1).first
           << endl;
    }
  }
  return 0;
}
