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 long long INF = 1LL << 60;
struct Edge {
  long long to, cap, rev;
  Edge(long long _to, long long _cap, long long _rev) {
    to = _to;
    cap = _cap;
    rev = _rev;
  }
};
void add_edge(vector<vector<Edge> > &G, long long from, long long to,
              long long cap) {
  G[from].push_back(Edge(to, cap, (long long)G[to].size()));
  G[to].push_back(Edge(from, 0, (long long)G[from].size() - 1));
}
long long max_flow_dfs(vector<vector<Edge> > &G, long long v, long long t,
                       long long f, vector<bool> &used) {
  if (v == t) return f;
  used[v] = true;
  for (int i = 0; i < G[v].size(); ++i) {
    Edge &e = G[v][i];
    if (!used[e.to] && e.cap > 0) {
      long long d = max_flow_dfs(G, e.to, t, min(f, e.cap), used);
      if (d > 0) {
        e.cap -= d;
        G[e.to][e.rev].cap += d;
        return d;
      }
    }
  }
  return 0;
}
long long max_flow(vector<vector<Edge> > &G, long long s, long long t) {
  long long flow = 0;
  for (;;) {
    vector<bool> used(G.size());
    for (int(i) = 0; (i) < (used.size()); (i)++) used[i] = false;
    long long f = max_flow_dfs(G, s, t, INF, used);
    if (f == 0) {
      return flow;
    }
    flow += f;
  }
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
class UnionFind {
  vector<int> data;

 public:
  UnionFind(int size) : data(size, -1) {}
  bool unionSet(int x, int y) {
    x = root(x);
    y = root(y);
    if (x != y) {
      if (data[y] < data[x]) swap(x, y);
      data[x] += data[y];
      data[y] = x;
    }
    return x != y;
  }
  bool findSet(int x, int y) { return root(x) == root(y); }
  int root(int x) { return data[x] < 0 ? x : data[x] = root(data[x]); }
  int size(int x) { return -data[root(x)]; }
};
void divisor(long long n, vector<long long> &ret) {
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(ret.begin(), ret.end());
}
long long factorial(long long n, long long mod) {
  long long ret = 1;
  for (long long i = 1; i <= n; i++) {
    ret = (ret * i) % mod;
  }
  return ret;
}
long long inv_mod(long long n, long long mod) {
  long long a = n % mod, b = mod - 2, ret = 1;
  while (b > 0) {
    if (b & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return ret;
}
long long nPr(long long n, long long r, long long mod) {
  long long ret = 1;
  for (long long i = n; i >= n - r + 1; i--) {
    ret = ret * (i % mod) % mod;
  }
  return ret;
}
long long nCr(long long n, long long r, long long mod) {
  return nPr(n, r, mod) * inv_mod(factorial(r, mod), mod) % mod;
}
bool compare_by_b(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.second != b.second) {
    return a.second > b.second;
  } else {
    return a.first > b.first;
  }
}
bool compare_by_a(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first != b.first) {
    return a.first > b.first;
  } else {
    return a.second > b.second;
  }
}
long long gcd(long long m, long long n) {
  if (n == 0) return m;
  return gcd(n, m % n);
}
int main() {
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  long long ans = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    cin >> a[i];
    if (a[i] > 0) ans += a[i];
  }
  long long neg = 0, pos = 0;
  for (int(i) = 0; (i) < (k); (i)++) {
    if (a[i] > 0) {
      pos += a[i];
    } else {
      neg += -a[i];
    }
  }
  long long min = pos;
  chmin(pos, neg);
  for (int(i) = 0; (i) < (n - k); (i)++) {
    if (a[i] > 0) {
      pos -= a[i];
    } else {
      neg += a[i];
    }
    if (a[i + k] > 0) {
      pos += a[i + k];
    } else {
      neg += -a[i + k];
    }
    chmin(min, pos);
    chmin(min, neg);
  }
  cout << ans - min;
  return 0;
}
