As usual, Sereja has array *a*, its elements are integers: *a*[1], *a*[2], ..., *a*[*n*]. Let's introduce notation:

A swap operation is the following sequence of actions:
 -  choose two indexes *i*, *j* (*i* ≠ *j*); -  perform assignments *tmp* = *a*[*i*], *a*[*i*] = *a*[*j*], *a*[*j*] = *tmp*. 
What maximum value of function *m*(*a*) can Sereja get if he is allowed to perform at most *k* swap operations?
The first line contains two integers *n* and *k* (1 ≤ *n* ≤ 200; 1 ≤ *k* ≤ 10). The next line contains *n* integers *a*[1], *a*[2], ..., *a*[*n*] ( - 1000 ≤ *a*[*i*] ≤ 1000).

n,k = map(int,input().split())
l = [0]*n
dp = [[-1001*200]*(k+1)]*n
l = list(map(int,input().split()))
maxSum = 200*-1001
m = 0
while m <n:
    r = m
    while r < n:
        while r+1 < n and l[r] > 0  :
            r = r + 1
        i = m
        sum = 0
        negs = []
        while i <= r:
            sum = sum + l[i]
            if l[i] < 0:
                negs.append(l[i])
            i = i + 1
        negs.sort(reverse=True)
        rem = []
        if r < n-1:
            rem = l[r+1:]
        if m > 0:
            rem = rem + l[0:m]
#print(m,r,rem)
        rem.sort(reverse=True)
        i = 0
        while i<k and i < len(negs) and i < len(rem):
            if  sum + rem[i] - negs[i] > sum:
                sum = sum + rem[i] - negs[i]
            i = i + 1
        maxSum = max(sum, maxSum)
        r = r + 1
    m = m + 1

print(maxSum)
