#include <bits/stdc++.h>
using namespace std;
const int dy[] = {-1, 0, 1, 0}, dx[] = {0, 1, 0, -1};
const double EPS = 1e-8;
const double PI = acos(-1.0);
int popcount(int n) { return __builtin_popcount(n); }
int popcount(long long n) { return __builtin_popcountll(n); }
template <class T>
int SIZE(T a) {
  return a.size();
}
template <class T>
string IntToString(T num) {
  string res;
  stringstream ss;
  ss << num;
  return ss.str();
}
template <class T>
T StringToInt(string str) {
  T res = 0;
  for (int i = 0; i < SIZE(str); i++) res = (res * 10 + str[i] - '0');
  return res;
}
template <class T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
template <class T>
void PrintSeq(T &a, int sz) {
  for (int i = 0; i < sz; i++) {
    cout << a[i];
    if (sz == i + 1)
      cout << endl;
    else
      cout << ' ';
  }
}
bool EQ(double a, double b) { return abs(a - b) < EPS; }
void fastStream() {
  cin.tie(0);
  std::ios_base::sync_with_stdio(0);
}
vector<string> split(string str, char del) {
  vector<string> res;
  for (int i = 0, s = 0; i < SIZE(str); i++) {
    if (str[i] == del) {
      if (i - s != 0) res.push_back(str.substr(s, i - s));
      s = i + 1;
    } else if (i == SIZE(str) - 1) {
      res.push_back(str.substr(s));
    }
  }
  return res;
}
int n, len;
long long as[100001];
int K;
void init(set<pair<long long, long long> > &n_upper_set, long long &n_upper_sum,
          set<pair<long long, long long> > &n_lower_set, long long &n_lower_sum,
          int i) {
  n_upper_set.insert(make_pair(abs(as[i]), i));
  n_upper_sum += abs(as[i]);
  if ((int)n_upper_set.size() > K) {
    pair<long long, long long> p = *n_upper_set.begin();
    n_upper_sum -= p.first;
    n_upper_set.erase(p);
    p.first *= -1;
    n_lower_set.insert(p);
    n_lower_sum += abs(p.first);
  }
}
void procOutVal(set<pair<long long, long long> > &p_upper_set,
                long long &p_upper_sum,
                set<pair<long long, long long> > &p_lower_set,
                long long &p_lower_sum, int i) {
  pair<long long, long long> p = make_pair(-abs(as[i]), i);
  if (p_lower_set.count(p)) {
    p_lower_set.erase(p);
    p_lower_sum -= abs(as[i]);
  } else {
    p.first *= -1;
    p_upper_set.erase(p);
    p_upper_sum -= abs(as[i]);
    if ((int)p_lower_set.size()) {
      pair<long long, long long> cand = *p_lower_set.begin();
      p_lower_set.erase(cand);
      p_lower_sum -= abs(cand.first);
      cand.first *= -1;
      p_upper_set.insert(cand);
      p_upper_sum += abs(cand.first);
    }
  }
}
int main() {
  fastStream();
  cin >> n >> len;
  for (int i = 0; i < n; i++) cin >> as[i];
  cin >> K;
  set<pair<long long, long long> > p_upper_set, p_lower_set;
  long long p_upper_sum = 0, p_lower_sum = 0;
  set<pair<long long, long long> > n_upper_set, n_lower_set;
  long long n_upper_sum = 0, n_lower_sum = 0;
  long long nowRangeSum = 0;
  for (int i = 0; i < len; i++) {
    nowRangeSum += as[i];
    if (as[i] >= 0) {
      init(p_upper_set, p_upper_sum, p_lower_set, p_lower_sum, i);
    } else {
      init(n_upper_set, n_upper_sum, n_lower_set, n_lower_sum, i);
    }
  }
  long long res = 0;
  for (int i = 0; i <= n - len; i++) {
    {
      long long sum = nowRangeSum + n_upper_sum * 2;
      res = max(res, abs(sum));
    }
    {
      long long sum = nowRangeSum - p_upper_sum * 2;
      res = max(res, abs(sum));
    }
    if (i == n - len) break;
    {
      if (as[i] >= 0) {
        procOutVal(p_upper_set, p_upper_sum, p_lower_set, p_lower_sum, i);
      } else {
        procOutVal(n_upper_set, n_upper_sum, n_lower_set, n_lower_sum, i);
      }
    }
    {
      if (as[i + len] >= 0) {
        if ((int)p_upper_set.size() < K) {
          p_upper_set.insert(make_pair(abs(as[i + len]), i + len));
          p_upper_sum += abs(as[i + len]);
        } else {
          pair<long long, long long> upsml = *p_upper_set.begin();
          if (upsml.first < abs(as[i + len])) {
            p_upper_set.erase(upsml);
            p_upper_sum -= abs(upsml.first);
            p_lower_set.insert(make_pair(-abs(upsml.first), upsml.second));
            p_lower_sum += abs(upsml.first);
            p_upper_set.insert(make_pair(abs(as[i + len]), i + len));
            p_upper_sum += abs(as[i + len]);
          } else {
            p_lower_set.insert(make_pair(-abs(as[i + len]), i + len));
            p_lower_sum += abs(as[i + len]);
          }
        }
      } else {
        if ((int)n_upper_set.size() < K) {
          n_upper_set.insert(make_pair(abs(as[i + len]), i + len));
          n_upper_sum += abs(as[i + len]);
        } else {
          pair<long long, long long> upsml = *n_upper_set.begin();
          if (upsml.first < abs(as[i + len])) {
            n_upper_set.erase(upsml);
            n_upper_sum -= abs(upsml.first);
            n_lower_set.insert(make_pair(-abs(upsml.first), upsml.second));
            n_lower_sum += abs(upsml.first);
            n_upper_set.insert(make_pair(abs(as[i + len]), i + len));
            n_upper_sum += abs(as[i + len]);
          } else {
            n_lower_set.insert(make_pair(-abs(as[i + len]), i + len));
            n_lower_sum += abs(as[i + len]);
          }
        }
      }
    }
    nowRangeSum -= as[i];
    nowRangeSum += as[i + len];
  }
  cout << res << endl;
  return 0;
}
