There are N squares aligned in a row. The i-th square from the left contains an integer a_i.

Initially, all the squares are white. Snuke will perform the following operation some number of times:

* Select K consecutive squares. Then, paint all of them white, or paint all of them black. Here, the colors of the squares are overwritten.



After Snuke finishes performing the operation, the score will be calculated as the sum of the integers contained in the black squares. Find the maximum possible score.

Constraints

* 1≤N≤10^5
* 1≤K≤N
* a_i is an integer.
* |a_i|≤10^9

Input

The input is given from Standard Input in the following format:


N K
a_1 a_2 ... a_N


Output

Print the maximum possible score.

Examples

Input

5 3
-10 10 -10 10 -10


Output

10


Input

4 2
10 -10 -10 10


Output

20


Input

1 1
-10


Output

0


Input

10 5
5 -4 -5 -8 -4 7 2 -4 0 7


Output

17
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  while (b) {
    long long r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int isPrim(int a) {
  if (a == 1) {
    return 0;
  }
  for (int i = 2; i <= (a + 1) / 2; i++) {
    if (a % i == 0) {
      return 0;
    }
  }
  return 1;
}
long long mod_pow(long long x, long long n, long long mod) {
  long long ret = 1;
  while (n > 0) {
    if (n % 2 == 1) {
      ret = (ret * x) % mod;
    }
    x = (x * x) % mod;
    n = n / 2;
  }
  return ret;
}
struct XX {
  int u;
  int v;
  int t;
};
class xxIntu {
 public:
  bool operator()(const XX& riLeft, const XX& riRight) const {
    if ((riLeft.t) == (riRight.t)) {
      return riLeft.u < riRight.u;
    }
    return (riLeft.t) < (riRight.t);
  }
};
int index(string in) {
  if (in == "A") {
    return 0;
  } else if (in == "B") {
    return 1;
  } else if (in == "C") {
    return 2;
  } else if (in == "D") {
    return 3;
  } else if (in == "E") {
    return 4;
  } else if (in == "F") {
    return 5;
  } else if (in == "G") {
    return 6;
  } else if (in == "H") {
    return 7;
  } else if (in == "I") {
    return 8;
  } else if (in == "J") {
    return 9;
  } else if (in == "K") {
    return 10;
  } else if (in == "L") {
    return 11;
  } else if (in == "M") {
    return 12;
  } else if (in == "N") {
    return 13;
  } else if (in == "O") {
    return 14;
  } else if (in == "P") {
    return 15;
  } else if (in == "Q") {
    return 16;
  } else if (in == "R") {
    return 17;
  } else if (in == "S") {
    return 18;
  } else if (in == "T") {
    return 19;
  } else if (in == "U") {
    return 20;
  } else if (in == "V") {
    return 21;
  } else if (in == "W") {
    return 22;
  } else if (in == "X") {
    return 23;
  } else if (in == "Y") {
    return 24;
  } else if (in == "Z") {
    return 25;
  }
  return -1;
}
string rindex(int in) {
  if (in == 65) {
    return "A";
  } else if (in == 66) {
    return "B";
  } else if (in == 67) {
    return "C";
  } else if (in == 68) {
    return "D";
  } else if (in == 69) {
    return "E";
  } else if (in == 70) {
    return "F";
  } else if (in == 71) {
    return "G";
  } else if (in == 72) {
    return "H";
  } else if (in == 73) {
    return "I";
  } else if (in == 74) {
    return "J";
  } else if (in == 75) {
    return "K";
  } else if (in == 76) {
    return "L";
  } else if (in == 77) {
    return "M";
  } else if (in == 78) {
    return "N";
  } else if (in == 79) {
    return "O";
  } else if (in == 80) {
    return "P";
  } else if (in == 81) {
    return "Q";
  } else if (in == 82) {
    return "R";
  } else if (in == 83) {
    return "S";
  } else if (in == 84) {
    return "T";
  } else if (in == 85) {
    return "U";
  } else if (in == 86) {
    return "V";
  } else if (in == 87) {
    return "W";
  } else if (in == 88) {
    return "X";
  } else if (in == 89) {
    return "Y";
  } else if (in == 90) {
    return "Z";
  }
  return "";
}
int ppar[200001];
int rrank[200001];
void init(int n) {
  for (int i = 1; i <= n; i++) {
    ppar[i] = i;
    rrank[i] = 0;
  }
}
int find(int x) {
  if (ppar[x] == x) {
    return x;
  } else {
    return ppar[x] = find(ppar[x]);
  }
}
void unite(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) {
    return;
  }
  if (rrank[x] < rrank[y]) {
    ppar[x] = ppar[y];
  } else {
    ppar[y] = x;
    if (rrank[x] == rrank[y]) {
      rrank[x]++;
    }
  }
}
bool same(int x, int y) { return find(x) == find(y); }
double maxd(double a, double b) {
  if (a >= b) {
    return a;
  }
  return b;
}
int main(int argc, const char* argv[]) {
  int N, K;
  cin >> N >> K;
  long long a[20];
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  long long tmp = 0;
  for (int i = 0; i < K; i++) {
    tmp += a[i];
  }
  long long mink = tmp;
  long long maxk = tmp;
  int mins = 0;
  int mine = K - 1;
  int maxs = 0;
  int maxe = K - 1;
  for (int i = K; i < N; i++) {
    tmp = tmp - a[i - K];
    tmp = tmp + a[i];
    if (mink > tmp) {
      mink = tmp;
      mins = i - K + 1;
      mine = i;
    }
    if (maxk < tmp) {
      maxk = tmp;
      maxs = i - K + 1;
      maxe = i;
    }
  }
  long long sum = 0;
  for (int i = 0; i < N; i++) {
    if ((i >= maxs && i <= maxe)) {
      sum = sum + a[i];
    } else {
      if (a[i] > 0) {
        sum = sum + a[i];
      }
    }
  }
  long long sum2 = 0;
  for (int i = 0; i < N; i++) {
    if ((i >= mins && i <= mine)) {
    } else {
      if (a[i] > 0) {
        sum2 = sum2 + a[i];
      }
    }
  }
  if (sum > sum2) {
    cout << sum << endl;
  } else {
    cout << sum2 << endl;
  }
  return 0;
}
