#include <bits/stdc++.h>
using namespace std;
typedef struct _node *node;
struct _node {
  int y;
  long long int x;
  long long int count;
  long long int sum;
  node L;
  node R;
};
node Node(long long int v) {
  node result = (node)malloc(sizeof(struct _node));
  result->x = v;
  result->y = rand();
  result->count = 1;
  result->sum = v;
  result->L = NULL;
  result->R = NULL;
  return result;
}
int count(node N) { return N != NULL ? N->count : 0; }
long long int sum(node N) { return N != NULL ? N->sum : 0; }
void update(node &N) {
  if (N != NULL) {
    N->count = count(N->L) + count(N->R) + 1;
    N->sum = sum(N->L) + sum(N->R) + N->x;
  }
}
void split(node T, long long int x, node &L, node &R) {
  if (T == NULL) {
    R = NULL;
    L = NULL;
  } else {
    if (T->x > x) {
      split(T->L, x, L, T->L);
      update(T);
      R = T;
    } else {
      split(T->R, x, T->R, R);
      update(T);
      L = T;
    }
  }
}
node add(node T, node N) {
  if (T == NULL) return N;
  if (N->y > T->y) {
    split(T, N->x, N->L, N->R);
    update(N);
    return N;
  }
  if (N->x < T->x) {
    T->L = add(T->L, N);
  } else {
    T->R = add(T->R, N);
  }
  update(T);
  return T;
}
void print(node T, int depth) {
  depth++;
  if (T == NULL) {
    for (int i = 0; i < depth; i++) cout << "\t";
    cout << "NULL" << endl;
  } else {
    for (int i = 0; i < depth; i++) cout << "\t";
    cout << T->x << " " << T->count << " " << T->sum << endl;
    print(T->L, depth);
    print(T->R, depth);
  }
}
node merge(node L, node R) {
  if (L == NULL) return R;
  if (R == NULL) return L;
  if (L->y > R->y) {
    L->R = merge(L->R, R);
    update(L);
    return L;
  } else {
    R->L = merge(L, R->L);
    update(R);
    return R;
  }
}
node remove(node T, long long int x) {
  if (T == NULL) return NULL;
  if (T->x == x) {
    node R = merge(T->L, T->R);
    free(T);
    update(R);
    return R;
  } else {
    if (x < T->x)
      T->L = remove(T->L, x);
    else
      T->R = remove(T->R, x);
    update(T);
    return T;
  }
}
long long int firstKSum(node T, int k) {
  long long int result;
  if (T == NULL) return 0;
  if (k == T->count) return T->sum;
  int c = count(T->R);
  if (c >= k) return firstKSum(T->R, k);
  return T->x + sum(T->R) + firstKSum(T->L, k - 1 - c);
}
const int MAXN = 100010;
int A[MAXN];
int main(void) {
  int n, l;
  cin >> n >> l;
  for (int i = 0; i < n; i++) cin >> A[i];
  int k = 0;
  cin >> k;
  node TN = NULL;
  node TP = NULL;
  for (int i = 0; i < l; i++) {
    if (A[i] >= 0)
      TP = add(TP, Node(A[i]));
    else
      TN = add(TN, Node(-A[i]));
  }
  long long int result = 0;
  long long int fks = 0;
  fks = firstKSum(TN, k);
  result = sum(TP) + fks - sum(TN) + fks;
  fks = firstKSum(TP, k);
  result = max(result, sum(TN) + fks - sum(TP) + fks);
  for (int i = 0; i < n - l; i++) {
    if (A[i] >= 0) {
      TP = remove(TP, A[i]);
    } else {
      TN = remove(TN, -A[i]);
    }
    if (A[l + i] >= 0) {
      TP = add(TP, Node(A[l + i]));
    } else {
      TN = add(TN, Node(-A[l + i]));
    }
    fks = firstKSum(TN, k);
    result = max(result, sum(TP) + fks - sum(TN) + fks);
    fks = firstKSum(TP, k);
    result = max(result, sum(TN) + fks - sum(TP) + fks);
  }
  cout << result << endl;
  return 0;
}
