#include <bits/stdc++.h>
using namespace std;
long long N, len, K;
long long arr[100100];
multiset<long long> pos1, pos2, neg1, neg2;
long long totpos1, totpos2, totneg1, totneg2, total, ans;
void insert(long long a) {
  if (a > 0) {
    if (pos2.size() < K) {
      pos2.insert(a);
      totpos2 += a;
    } else if (!pos2.empty() && a > *pos2.begin()) {
      pos2.insert(a);
      totpos2 += a;
      long long mins = *pos2.begin();
      pos2.erase(pos2.find(mins));
      totpos2 -= mins;
      pos1.insert(mins);
      totpos1 += mins;
    } else {
      pos1.insert(a);
      totpos1 += a;
    }
  }
  if (a < 0) {
    if (neg2.size() < K) {
      neg2.insert(a);
      totneg2 += a;
    } else if (!neg2.empty() && a < *neg2.rbegin()) {
      neg2.insert(a);
      totneg2 += a;
      long long maks = *neg2.rbegin();
      neg2.erase(neg2.find(maks));
      totneg2 -= maks;
      neg1.insert(maks);
      totneg1 += maks;
    } else {
      neg1.insert(a);
      totneg1 += a;
    }
  }
}
void erase(long long a) {
  if (a > 0) {
    if (pos1.count(a) > 0) {
      pos1.erase(pos1.find(a));
      totpos1 -= a;
    } else {
      if (pos2.size() == K) {
        if (!pos1.empty()) {
          long long maks = *pos1.rbegin();
          pos1.erase(pos1.find(maks));
          totpos1 -= maks;
          pos2.insert(maks);
          totpos2 += maks;
        }
      }
      pos2.erase(pos2.find(a));
      totpos2 -= a;
    }
  }
  if (a < 0) {
    if (neg1.count(a) > 0) {
      neg1.erase(neg1.find(a));
      totneg1 -= a;
    } else {
      if (neg2.size() == K) {
        if (!neg1.empty()) {
          long long mins = *neg1.begin();
          neg1.erase(neg1.find(mins));
          totneg1 -= mins;
          neg2.insert(mins);
          totneg2 += mins;
        }
      }
      neg2.erase(neg2.find(a));
      totneg2 -= a;
    }
  }
}
long long result() {
  return max(abs(totpos1 - totpos2 + totneg1 + totneg2),
             abs(totpos1 + totpos2 + totneg1 - totneg2));
}
void debug() {
  cout << "pos1 :";
  for (auto it = pos1.begin(); it != pos1.end(); it++) cout << " " << *it;
  cout << endl;
  cout << "pos2 :";
  for (auto it = pos2.begin(); it != pos2.end(); it++) cout << " " << *it;
  cout << endl;
  cout << "neg1 :";
  for (auto it = neg1.begin(); it != neg1.end(); it++) cout << " " << *it;
  cout << endl;
  cout << "neg2 :";
  for (auto it = neg2.begin(); it != neg2.end(); it++) cout << " " << *it;
  cout << endl;
}
int main() {
  cin >> N >> len;
  for (int i = 1; i <= N; i++) {
    cin >> arr[i];
  }
  cin >> K;
  for (int i = 1; i <= len; i++) {
    insert(arr[i]);
  }
  ans = result();
  for (int i = 2; i <= N - len + 1; i++) {
    erase(arr[i - 1]);
    insert(arr[i + len - 1]);
    ans = max(ans, result());
  }
  cout << ans << endl;
}
