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>
int descending_compare(const void *a, const void *b) {
  if (*(int *)a > *(int *)b) {
    return -1;
  } else if (*(int *)a == *(int *)b) {
    return 0;
  } else {
    return 1;
  }
}
int ascending_compare(const void *a, const void *b) {
  if (*(int *)a < *(int *)b) {
    return -1;
  } else if (*(int *)a == *(int *)b) {
    return 0;
  } else {
    return 1;
  }
}
int lower_bound(int *a, int n, int key) {
  int ng, mid, ok;
  ng = -1, ok = n - 1;
  while (abs(ok - ng) > 1) {
    mid = (ok + ng) / 2;
    if (key <= a[mid]) {
      ok = mid;
    } else {
      ng = mid;
    }
  }
  if (a[ok] >= key) return ok;
  return n;
}
unsigned long gcd(unsigned long x, unsigned long y) {
  if (y == 0) {
    return x;
  } else if (x > y) {
    return gcd(y, x % y);
  } else {
    return gcd(x, y % x);
  }
}
unsigned long lcm(unsigned long x, unsigned long y) {
  unsigned long g = gcd(x, y);
  return x * y / g;
}
long long factorial(int x) {
  long long rtn = 1;
  int i;
  for (i = x; i > 1; i--) {
    rtn = (rtn * i);
  }
  return rtn;
}
long long mod = 1000000007;
long long mod_pow(long long x, long long n) {
  long long res = 1;
  for (int i = 0; i < 60; i++) {
    if (n >> i & 1) res = res * x % mod;
    x = x * x % mod;
  }
  return res;
}
long long imos[100005];
long long a[100005];
int main(void) {
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  long long score = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > 0) score += a[i];
  }
  imos[0] = a[0];
  for (int i = 1; i < n; i++) {
    imos[i] = imos[i - 1] + a[i];
  }
  long long min = 100000000000005;
  int mini;
  long long max = -100000000000005;
  int maxi;
  for (int i = k - 1; i < n; i++) {
    if (i - k < 0) {
      if (imos[i] < min) {
        min = imos[i];
        mini = i;
      }
      if (imos[i] > max) {
        max = imos[i];
        maxi = i;
      }
    } else {
      if (imos[i] - imos[i - k] < min) {
        min = imos[i] - imos[i - k];
        mini = i;
      }
      if (imos[i] - imos[i - k] > max) {
        max = imos[i] - imos[i - k];
        maxi = i;
      }
    }
  }
  long long max_score = 0;
  long long min_score = 0;
  for (int i = maxi - k + 1; i <= maxi; i++) {
    if (a[i] < 0) max_score += a[i];
  }
  for (int i = mini - k + 1; i <= mini; i++) {
    if (a[i] > 0) min_score -= a[i];
  }
  if (score + min_score > score + max_score) {
    score = score + min_score;
  } else {
    score = score + max_score;
  }
  printf("%lld\n", score);
}
