#include <bits/stdc++.h>
using namespace std;
int a[100010];
int n, len;
int main() {
  ios_base::sync_with_stdio(0);
  while (cin >> n >> len) {
    int k;
    for (int i = (0); i < ((n)); ++i) cin >> a[i];
    cin >> k;
    long long sum[2] = {0}, ex[2] = {0};
    long long res = 0;
    set<pair<int, int>, greater<pair<int, int> > > s[2];
    set<pair<int, int> > s2[2];
    for (int i = (0); i < ((len)); ++i) {
      int p = (a[i] < 0);
      s[p].insert(make_pair(abs(a[i]), i));
      sum[p] += abs(a[i]);
    }
    for (int i = (0); i < ((2)); ++i) {
      typeof(s[i].begin()) it = s[i].begin();
      int j = 0;
      while (it != s[i].end() && j < k) {
        if (it->first != 0) {
          ex[i] += it->first;
          s2[i].insert(*it);
          j++;
        }
        it++;
      }
      for (typeof((s2[i]).begin()) it = (s2[i]).begin(); it != (s2[i]).end();
           ++it)
        s[i].erase(s[i].find(*it));
    }
    res =
        max(abs(sum[0] - sum[1] + 2 * ex[1]), abs(sum[1] - sum[0] + 2 * ex[0]));
    for (int i = 0; i + len < n; ++i) {
      int p = (a[i] < 0);
      pair<int, int> A = make_pair(abs(a[i]), i);
      if (((s[p]).find(A) != (s[p]).end())) {
        s[p].erase(s[p].find(A));
      } else {
        s2[p].erase(s2[p].find(A));
        ex[p] -= abs(a[i]);
        if (!s[p].empty()) {
          s2[p].insert(*s[p].begin());
          ex[p] += s[p].begin()->first;
          s[p].erase(s[p].begin());
        }
      }
      sum[p] -= abs(a[i]);
      int l = i + len;
      p = (a[l] < 0);
      A = make_pair(abs(a[l]), l);
      sum[p] += abs(a[l]);
      s[p].insert(A);
      typeof(s[p].begin()) it = s[p].begin();
      if (it != s[p].end() && s2[p].size() < k) {
        if (it->first > 0) {
          s2[p].insert(*it);
          ex[p] += it->first;
          s[p].erase(it);
        }
      }
      it = s[p].begin();
      if (it != s[p].end() && !s2[p].empty() &&
          s2[p].begin()->first < it->first) {
        typeof(s2[p].begin()) t = s2[p].begin();
        ex[p] += it->first - t->first;
        s[p].insert(*t);
        s[p].erase(it);
        s2[p].insert(*it);
        s2[p].erase(t);
      }
      long long x = max(abs(sum[0] - sum[1] + !!k * 2 * ex[1]),
                        abs(sum[1] - sum[0] + !!k * 2 * ex[0]));
      res = max(res, x);
    }
    cout << res << endl;
  }
  return 0;
}
