#include <bits/stdc++.h>
using namespace std;
const int toMod = 1000000007;
int n, len, k;
int a[1 << 17];
long long fp[1 << 17];
long long fn[1 << 17];
inline long long abs64(long long x) {
  if (x < 0) return -x;
  return x;
}
inline void init() {
  scanf("%d%d", &n, &len);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; ++i) {
    fp[i] = 0;
    fn[i] = 0;
    if (a[i] > 0) fp[i] = a[i];
    if (a[i] < 0) fn[i] = a[i];
    if (i) {
      fp[i] += fp[i - 1];
      fn[i] += fn[i - 1];
    }
  }
  scanf("%d", &k);
  if (k > len) k = len;
}
inline long long getSumP(int l, int r) {
  long long res = fp[r];
  if (l) res -= fp[l - 1];
  return res;
}
inline long long getSumN(int l, int r) {
  long long res = fn[r];
  if (l) res -= fn[l - 1];
  return res;
}
struct megaset {
  int cnt;
  int LAST;
  long long curSum;
  int inSet[1 << 17];
  priority_queue<pair<int, int>, vector<pair<int, int> >,
                 greater<pair<int, int> > >
      qmin;
  priority_queue<pair<int, int> > qmax;
  void clear() {
    LAST = -1;
    curSum = 0;
    cnt = 0;
    memset(inSet, 0, sizeof inSet);
    while (!qmin.empty()) qmin.pop();
    while (!qmax.empty()) qmax.pop();
  }
  void refresh() {
    if (!k) return;
    while (!qmax.empty()) {
      if (qmax.top().second <= LAST) {
        qmax.pop();
        continue;
      }
      if (cnt == k) break;
      pair<int, int> cur = qmax.top();
      qmax.pop();
      qmin.push(cur);
      curSum += (long long)cur.first;
      inSet[cur.second] = 1;
      ++cnt;
    }
    while (!qmax.empty()) {
      if (qmax.top().second <= LAST) {
        qmax.pop();
        continue;
      }
      pair<int, int> cur = qmax.top();
      while (!qmin.empty() && !inSet[qmin.top().second]) qmin.pop();
      if (cur.first > qmin.top().first) {
        qmax.pop();
        pair<int, int> cur2 = qmin.top();
        qmin.pop();
        qmin.push(cur);
        qmax.push(cur2);
        curSum -= (long long)cur2.first;
        curSum += (long long)cur.first;
        inSet[cur2.second] = 0;
        inSet[cur.second] = 1;
      } else
        break;
    }
  }
  void remove(int id) {
    LAST = id;
    if (!inSet[id]) return;
    inSet[id] = 0;
    curSum -= a[id];
    --cnt;
    while (!qmin.empty() && !inSet[qmin.top().second]) qmin.pop();
    refresh();
  }
  void add(int id) {
    qmax.push(pair<int, int>(a[id], id));
    refresh();
  }
};
megaset A;
inline long long solve() {
  A.clear();
  for (int i = 0; i < len; ++i) {
    if (a[i] > 0) A.add(i);
  }
  long long res =
      abs64(getSumP(0, len - 1) - 2 * A.curSum + getSumN(0, len - 1));
  for (int i = len; i < n; ++i) {
    if (a[i - len] > 0) A.remove(i - len);
    if (a[i] > 0) A.add(i);
    long long cur =
        abs64(getSumP(i - len + 1, i) - 2 * A.curSum + getSumN(i - len + 1, i));
    res = max(res, cur);
  }
  return res;
}
int main() {
  init();
  long long res = solve();
  for (int i = 0; i < n; ++i) a[i] = -a[i];
  for (int i = 0; i < n; ++i) {
    fp[i] = 0;
    fn[i] = 0;
    if (a[i] > 0) fp[i] = a[i];
    if (a[i] < 0) fn[i] = a[i];
    if (i) {
      fp[i] += fp[i - 1];
      fn[i] += fn[i - 1];
    }
  }
  res = max(res, solve());
  cout << res << endl;
  return 0;
}
