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;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
constexpr ll MOD = 1000000007;
constexpr ll INF = 1e16;
constexpr ld EPS = 1e-10;
constexpr ld PI = 3.141592653589793;
const string endn = "\n";
const string abc = "abcdefghijklmnopqrstuvwxyz";
const string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
template <class T1, class T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &o) {
  out << "(" << o.first << ", " << o.second << ")";
  return out;
}
template <class T>
ostream &operator<<(ostream &out, const vector<T> &o) {
  for (auto itr = o.begin(); itr != o.end(); itr++)
    out << *itr << (itr + 1 != o.end() ? " " : "");
  return out;
}
template <class T>
ostream &operator<<(ostream &out, const deque<T> &o) {
  for (auto itr = o.begin(); itr != o.end(); itr++)
    out << *itr << (itr + 1 != o.end() ? " " : "");
  return out;
}
template <class T>
ostream &operator<<(ostream &out, const set<T> &o) {
  out << "{";
  for (auto itr = o.begin(); itr != o.end(); itr++)
    out << *itr << (next(itr, 1) != o.end() ? "," : "");
  out << "}";
  return out;
}
template <class T>
ostream &operator<<(ostream &out, const multiset<T> &o) {
  out << "{";
  for (auto itr = o.begin(); itr != o.end(); itr++)
    out << *itr << (next(itr, 1) != o.end() ? "," : "");
  out << "}";
  return out;
}
template <class T, class U>
ostream &operator<<(ostream &out, const map<T, U> &o) {
  out << "{";
  for (auto itr = o.begin(); itr != o.end(); itr++)
    out << *itr << (next(itr, 1) != o.end() ? " " : "");
  out << "}";
  return out;
}
template <class T, class U>
ostream &operator<<(ostream &out, const multimap<T, U> &o) {
  out << "{";
  for (auto itr = o.begin(); itr != o.end(); itr++)
    out << *itr << (next(itr, 1) != o.end() ? " " : "");
  out << "}";
  return out;
}
template <class T>
ostream &operator<<(ostream &out, queue<T> o) {
  while (!o.empty()) out << o.front() << (o.size() > 0 ? " " : ""), o.pop();
  return out;
}
template <class T, class U>
ostream &operator<<(ostream &out, priority_queue<T, vector<T>, U> o) {
  while (!o.empty()) out << o.top() << (o.size() > 0 ? " " : ""), o.pop();
  return out;
}
template <class T>
ostream &operator<<(ostream &out, stack<T> o) {
  while (!o.empty()) out << o.top() << (o.size() > 0 ? " " : ""), o.pop();
  return out;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a >= b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a <= b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, initializer_list<T> b) {
  T c = min(b);
  if (a > c) {
    a = c;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmax(T &a, initializer_list<T> b) {
  T c = max(b);
  if (a < c) {
    a = c;
    return 1;
  }
  return 0;
}
inline ll mrep(ll &a, ll M = MOD) {
  a %= M;
  return a = (a < 0 ? a + M : a);
}
inline ll add(ll &a, ll b, ll M = MOD) {
  return a = (mrep(a, M) + mrep(b, M)) % M;
}
inline ll mul(ll &a, ll b, ll M = MOD) {
  return a = (mrep(a, M) * mrep(b, M)) % M;
}
inline ll add(ll &a, initializer_list<ll> b, ll M = MOD) {
  return a = (mrep(a, M) + accumulate(b.begin(), b.end(), (ll)0,
                                      [&M](ll acc, ll i) {
                                        return (acc + mrep(i, M)) % M;
                                      })) %
             M;
}
inline ll mul(ll &a, initializer_list<ll> b, ll M = MOD) {
  return a = (mrep(a, M) * accumulate(b.begin(), b.end(), (ll)1,
                                      [&M](ll acc, ll i) {
                                        return (acc * mrep(i, M)) % M;
                                      })) %
             M;
}
inline ll modpow(ll b, ll e, ll M = MOD) {
  ll ret = 1;
  while (e > 0) {
    if (e % 2) mul(ret, b, M);
    mul(b, b, M);
    e /= 2;
  };
  return ret;
}
inline ll modinv(ll a, ll M = MOD) {
  ll b = M, u = 1, v = 0;
  while (b) {
    ll t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  return mrep(u, M);
}
template <class T>
inline void print(T a) {
  cout << a << endl;
}
template <class T>
inline void print(vector<T> a, ll n) {
  chmin(n, ll(a.size()));
  for (ll i = 0; i < ll(n); i++) cout << a[i] << (i != n - 1 ? " " : "\n");
}
template <class T, size_t SIZE>
inline void print(T (&a)[SIZE], ll n = SIZE) {
  chmin(n, ll(SIZE));
  for (ll i = 0; i < ll(n); i++) cout << a[i] << (i != n - 1 ? " " : "\n");
}
inline string yesno(bool b) { return (b ? "Yes" : "No"); }
#pragma #endregion tmp
signed main() {
  ll n, k;
  cin >> n >> k;
  ll ans = 0, a[110000];
  for (ll i = 0; i < ll(n); i++) cin >> a[i];
  ll sum = 0, uni = 0, kk = 0;
  for (ll i = 0; i < ll(k); i++) {
    sum += a[i];
    kk += max(0LL, a[i]);
  }
  for (ll i = 0; i < ll(n); i++) uni += max(0LL, a[i]);
  ans = max(0LL, sum) + uni - kk;
  for (ll i = k; i < ll(n); i++) {
    sum -= a[i - k];
    sum += a[i];
    k -= max(0LL, a[i - k]);
    k += max(0LL, a[i]);
    chmax(ans, max(0LL, sum) + uni - kk);
  }
  cout << ans << endl;
}
