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())
a = list(map(int, input().split()))
b = []
i = j = 0

while i < n:
    j = i
    s = 0
    while j<n and a[j]>0:
        s += a[j]
        j += 1
    if s>0:
        b.append((s, i, j-1))
    i = j+1

if len(b) == 0:
    print(max(a))
else:
    b.sort(key= lambda x: x[0], reverse= True)
    m = 0
    for i in range(len(b)):
        x = b[i][1]
        y = b[i][2]
        z = b[i][0]
        p = k

        for j in range(i+1, len(b)):
            f = b[j][1]
            g = b[j][2]
            h = b[j][0]
            if f > y and p-(f-y-1) >= 0:
                z += h
                p -= f-y-1
            elif g < x and p-(x-g-1) >= 0:
                z += h
                p -= x-g-1

        m = max(m, z)
    print(m)
