#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, len, k, ans;
  cin >> n >> len;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  cin >> k;
  long long sum = 0, sumout = 0;
  multiset<long long> negout;
  multiset<long long> negin;
  for (int i = 0; i < len; i++) {
    sum += abs(a[i]);
    if (a[i] < 0) {
      if (negin.size() < k)
        negin.insert(abs(a[i]));
      else if (k && *negin.begin() < abs(a[i])) {
        sumout += *negin.begin();
        negout.insert(*negin.begin());
        negin.erase(negin.begin());
        negin.insert(abs(a[i]));
      } else {
        sumout += abs(a[i]);
        negout.insert(abs(a[i]));
      }
    }
  }
  ans = sum - 2 * sumout;
  multiset<long long>::iterator it;
  for (int j = len; j < n; j++) {
    sum -= abs(a[j - len]);
    if (a[j - len] < 0) {
      it = negout.find(abs(a[j - len]));
      if (it != negout.end()) {
        sumout -= abs(a[j - len]);
        negout.erase(it);
      } else {
        negin.erase(negin.find(abs(a[j - len])));
        if (negout.size()) {
          it = negout.end();
          it--;
          sumout -= *it;
          negin.insert(*it);
          negout.erase(it);
        }
      }
    }
    sum += abs(a[j]);
    if (a[j] < 0) {
      if (negin.size() < k)
        negin.insert(abs(a[j]));
      else if (k && *negin.begin() < abs(a[j])) {
        sumout += *negin.begin();
        negout.insert(*negin.begin());
        negin.erase(negin.begin());
        negin.insert(abs(a[j]));
      } else {
        sumout += abs(a[j]);
        negout.insert(abs(a[j]));
      }
    }
    ans = max(ans, sum - 2 * sumout);
  }
  for (int i = 0; i < n; i++) a[i] = -a[i];
  negout.clear();
  negin.clear();
  sum = 0;
  sumout = 0;
  for (int i = 0; i < len; i++) {
    sum += abs(a[i]);
    if (a[i] < 0) {
      if (negin.size() < k)
        negin.insert(abs(a[i]));
      else if (k && *negin.begin() < abs(a[i])) {
        sumout += *negin.begin();
        negout.insert(*negin.begin());
        negin.erase(negin.begin());
        negin.insert(abs(a[i]));
      } else {
        sumout += abs(a[i]);
        negout.insert(abs(a[i]));
      }
    }
  }
  ans = max(ans, sum - 2 * sumout);
  for (int j = len; j < n; j++) {
    sum -= abs(a[j - len]);
    if (a[j - len] < 0) {
      it = negout.find(abs(a[j - len]));
      if (it != negout.end()) {
        sumout -= abs(a[j - len]);
        negout.erase(it);
      } else {
        negin.erase(negin.find(abs(a[j - len])));
        if (negout.size()) {
          it = negout.end();
          it--;
          sumout -= *it;
          negin.insert(*it);
          negout.erase(it);
        }
      }
    }
    sum += abs(a[j]);
    if (a[j] < 0) {
      if (negin.size() < k)
        negin.insert(abs(a[j]));
      else if (k && *negin.begin() < abs(a[j])) {
        sumout += *negin.begin();
        negout.insert(*negin.begin());
        negin.erase(negin.begin());
        negin.insert(abs(a[j]));
      } else {
        sumout += abs(a[j]);
        negout.insert(abs(a[j]));
      }
    }
    ans = max(ans, sum - 2 * sumout);
  }
  cout << ans << '\n';
  return 0;
}
