#include <bits/stdc++.h>
using namespace std;
const int oo = 1 << 20;
const double PI = M_PI;
const double EPS = 1e-15;
const int MaxN = 100005;
int N, L, K;
long long a[MaxN];
long long cnt[2][MaxN];
long long sum[2][MaxN];
int pos[MaxN];
int realPos[MaxN];
bool cmp(int x, int y) { return abs(a[x]) < abs(a[y]); }
void update(int index, int k, int val, long long number) {
  for (int i = k; i <= N; i += (i & -i)) {
    cnt[index][i] += val;
    sum[index][i] += val * llabs(number);
  }
}
pair<long long, int> query(int index, int k) {
  pair<long long, int> ret = make_pair(0, 0);
  for (int i = k; i > 0; i -= (i & -i)) {
    ret.first = ret.first + sum[index][i];
    ret.second = ret.second + cnt[index][i];
  }
  return ret;
}
long long getSum(int index, int kth) {
  int lo = 1;
  int hi = N;
  while (lo <= hi) {
    int mid = (lo + hi) >> 1;
    if (query(index, mid).second < kth)
      lo = mid + 1;
    else
      hi = mid - 1;
  }
  return query(index, lo).first;
}
int main() {
  cin.sync_with_stdio(false);
  cin >> N >> L;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
    pos[i] = i;
  }
  cin >> K;
  sort(pos + 1, pos + N + 1, cmp);
  for (int i = 1; i <= N; ++i) realPos[pos[i]] = i;
  long long answer = 0;
  long long nSum = 0, nCnt = 0;
  long long pSum = 0, pCnt = 0;
  for (int i = 1; i <= N; i++) {
    if (a[i] >= 0)
      pSum += a[i], pCnt++;
    else
      nSum += a[i], nCnt++;
    update(a[i] < 0, realPos[i], +1, a[i]);
    if (i < L) continue;
    answer = max(answer, llabs(pSum + nSum));
    if (nCnt <= K || pCnt <= K)
      answer = max(answer, pSum - nSum);
    else {
      answer =
          max(answer, llabs(pSum + nSum + 2 * (-nSum - getSum(1, nCnt - K))));
      answer =
          max(answer, llabs(pSum + nSum - 2 * (+pSum - getSum(0, pCnt - K))));
    }
    if (a[i - L + 1] >= 0)
      pSum -= a[i - L + 1], pCnt--;
    else
      nSum -= a[i - L + 1], nCnt--;
    update(a[i - L + 1] < 0, realPos[i - L + 1], -1, a[i - L + 1]);
  }
  cout << answer << endl;
  return 0;
}
