#include <bits/stdc++.h>
using namespace std;
#pragma GCC("Ofast")
const int mm = 1e5 + 5;
const long long oo = 1e15 + 7;
int n, l, k;
struct i2 {
  int gt, vt;
};
struct ss {
  bool operator()(i2 tam1, i2 tam2) { return tam1.gt < tam2.gt; }
};
struct ss1 {
  bool operator()(i2 tam1, i2 tam2) { return tam1.gt > tam2.gt; }
};
struct ii {
  priority_queue<i2, vector<i2>, ss> hma;
  priority_queue<i2, vector<i2>, ss1> hmi;
  long long sma, smi;
  int lma, lmi;
};
ii h[2];
int a[mm], kt[mm];
long long b[mm];
void nhap() {
  scanf("%d %d", &n, &l);
  for (int i = 1; i <= n; i++) scanf("%lld", &b[i]), a[i] = abs(b[i]);
  scanf("%d", &k);
}
void don(int vt, int tp) {
  if (vt <= 0) return;
  while (h[tp].hmi.size() && h[tp].hmi.top().vt <= vt) h[tp].hmi.pop();
  while (h[tp].hma.size() && h[tp].hma.top().vt <= vt) h[tp].hma.pop();
}
void them(int vt, int tp) {
  if (h[tp].lmi < k) {
    h[tp].hmi.push({a[vt], vt});
    h[tp].smi += (long long)a[vt];
    h[tp].lmi++;
    kt[vt] = 1;
  } else {
    don(vt - l, tp);
    i2 tam = h[tp].hmi.top();
    if (tam.gt < a[vt]) {
      h[tp].hmi.pop();
      h[tp].hmi.push({a[vt], vt});
      h[tp].smi += (long long)a[vt] - tam.gt;
      h[tp].hma.push(tam);
      h[tp].sma += (long long)tam.gt;
      h[tp].lma++;
      kt[tam.vt] = 2;
      kt[vt] = 1;
    } else {
      h[tp].hma.push({a[vt], vt});
      h[tp].sma += (long long)a[vt];
      h[tp].lma++;
      kt[vt] = 2;
    }
  }
}
void bo(int vt, int tp) {
  if (vt <= 0) return;
  if (kt[vt] == 1) {
    h[tp].smi -= (long long)a[vt];
    h[tp].lmi--;
    kt[vt] = 0;
    don(vt, tp);
    if (h[tp].lma > 0) {
      i2 tam = h[tp].hma.top();
      h[tp].hma.pop();
      h[tp].sma -= (long long)tam.gt;
      h[tp].lma--;
      h[tp].hmi.push(tam);
      h[tp].smi += (long long)tam.gt;
      h[tp].lmi++;
      kt[tam.vt] = 1;
    }
  } else if (kt[vt] == 2) {
    h[tp].sma -= (long long)a[vt];
    h[tp].lma--;
    kt[vt] = 0;
  }
}
void xuli() {
  long long re = -oo;
  if (!k) {
    for (int i = 1; i <= n; i++) {
      b[i] += (long long)b[i - 1];
      if (i >= l) re = max(re, (long long)abs(b[i] - b[i - l]));
    }
    printf("%lld", re);
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (b[i] >= 0)
      them(i, 1);
    else
      them(i, 0);
    if (i > l) {
      if (b[i - l] >= 0)
        bo(i - l, 1);
      else
        bo(i - l, 0);
    }
    if (i >= l)
      re = max(re, (long long)h[1].smi + h[0].smi + abs(h[1].sma - h[0].sma));
  }
  printf("%lld", re);
}
int main() {
  nhap();
  xuli();
}
