#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2e5 + 22;
long long n, a, b, k, q, req[MAXN], fen[MAXN][2];
void add(long long h, long long x, long long val) {
  for (; x < MAXN; x += x & -x) fen[x][h] += val;
}
long long fans(long long h, long long x) {
  long long ret = 0;
  for (; x; x -= x & -x) ret += fen[x][h];
  return ret;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  cin >> n >> k >> a >> b >> q;
  swap(a, b);
  while (q--) {
    long long t, day, val, p;
    cin >> t;
    if (t == 1) {
      cin >> day >> val;
      long long r1 = min(req[day], a), r2 = min(req[day], b);
      add(1, day, -r1);
      add(2, day, -r2);
      req[day] += val;
      r1 = min(req[day], a), r2 = min(req[day], b);
      add(1, day, r1);
      add(2, day, r2);
    } else {
      cin >> p;
      long long res = fans(1, p - 1);
      res += fans(2, n) - fans(2, p + k - 1);
      cout << res << endl;
    }
  }
  return 0;
}
