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;
const double PI = 3.14159265358979323846;
const long long INF = 0x3f3f3f3f;
const long long LLINF = 1000000000000000005LL;
;
const long long MOD = (long long)(1e9) + 7;
const long long MX = 777777 + 5;
const long long mod = 1777777777;
const double EPS = 1e-10;
const long long MXP = 8999251775770639633;
const long long _500k = 500005;
const long long _200k = 200005;
const long long _20k = 20005;
const long long _100k = 100005;
const long long _10k = 10005;
long long readint() {
  long long x;
  cin >> x;
  return x;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (auto a : v) os << a << " ";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  for (auto a : v) os << a << " ";
  return os;
}
inline long long len(string s) { return s.size(); }
inline long long len(long long* A) { return (sizeof(A)) / sizeof(A[0]); }
template <typename T>
inline long long len(vector<T> v) {
  return v.size();
}
template <typename T>
inline long long len(set<T> v) {
  return v.size();
}
template <typename T, typename S>
inline long long len(map<T, S> v) {
  return v.size();
}
long long fac[MX + 5];
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long modInverse(long long n, long long p) { return power(n, p - 2, p); }
long long C(long long n, long long r, long long p) {
  if (r == 0) return 1;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
void init(long long mod) {
  fac[0] = 1;
  for (long long i = 1; i <= MX; i++) fac[i] = fac[i - 1] * i % mod;
}
long long CC(long long a, long long b) {
  long long res = 1;
  for (__typeof(a - b + 1) i = (a + 1) - ((a + 1) > (a - b + 1));
       i != (a - b + 1) - ((a + 1) > (a - b + 1));
       i += 1 - 2 * ((a + 1) > (a - b + 1)))
    res *= i, res /= a - i + 1;
  return res;
}
bool equal(double a, double b) {
  return std::fabs(a - b) < std::numeric_limits<double>::epsilon();
}
struct UnionFind {
  vector<long long> par;
  vector<long long> sizes;
  UnionFind(long long n) : par(n), sizes(n, 1) {
    for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
         i += 1 - 2 * ((0) > (n)))
      par[i] = i;
  }
  long long find(long long x) {
    if (x == par[x]) return x;
    return par[x] = find(par[x]);
  }
  void unite(long long x, long long y) {
    x = find(x);
    y = find(y);
    if (x == y) return;
    if (sizes[x] < sizes[y]) swap(x, y);
    par[y] = x;
    sizes[x] += sizes[y];
  }
  bool same(long long x, long long y) { return find(x) == find(y); }
  long long size(long long x) { return sizes[find(x)]; }
};
struct cpmFunctor {
  inline bool operator()(const pair<long long, long long>& p1,
                         const pair<long long, long long>& p2) {
    return p1.first < p2.first ||
           (p1.first == p2.first && p1.second < p2.second);
  }
};
long long A[_100k];
long long S[_100k];
long long SS[_100k];
void _() {
  long long n, k;
  cin >> n >> k;
  for (long long i = 0; i < n; ++i) {
    cin >> A[i];
  }
  long long sum = 0;
  for (long long i = 0; i < n; ++i) {
    S[i + 1] += S[i] + (A[i] > 0) * A[i];
    SS[i + 1] += SS[i] + (A[i] <= 0) * A[i];
  }
  if (n == k) {
    for (long long i = 0; i < n; ++i) {
      sum += A[i];
    }
    cout << (sum > 0 ? sum : 0);
  } else {
    long long mi = INF;
    for (long long i = 1; i < n - k + 1; ++i) {
      mi = min({mi, S[i + k] - S[i], (SS[i] - SS[i + k])});
    }
    cout << S[n] - mi << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  _();
}
