#include<bits/stdc++.h>
 
using namespace std;
 
long long N, K, a[100000], parsum1[100001], parsum2[100001];
long long ans = -(1LL<<60);;
 
int main(){
	cin >> N >> K;
	for(int i = 0; i < N; ++i) cin >> a[i];
	
	long long sum1 = 0, sum2 = 0;
	for(long long i = 1; i <= N; ++i){
		sum1 += a[i-1]; parsum1[i] = sum1;
		if(a[i-1] >= 0) sum2 += a[i-1];
		parsum2[i] = sum2;
	}
	
	long long lsum = 0, csum = 0, rsum = 0;
	for(long long i = 0; i < N - K; ++i){
		csum = max(0, parsum1[i+K] - parsum1[i+1]);
		lsum = parsum2[i];
		rsum = parsum2[N] - parsum2[i+K];
		ans = max(ans, lsum + csum + rsum);
		cout << lsum << "+" << csum << "+" << rsum << "=" << lsum + csum + rsum << endl;
	}
	cout << ans << endl;
}