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).
res = -1e9
for i in range(n):
    for j in range(n):
        b = a[i:j+1]
        if not b:
            continue
        if i > 0 and j < n-1:
            c = a[:i]+a[j+1:]
        elif i == 0 and j < n-1:
            c = a[j+1:]
        elif i > 0 and j == n-1:
            c = a[:i]
        b.sort()
        c.sort(reverse = True)
        b1 = 0
        c1 = 0
        l = 0
        while l < k and b1 < len(b) and c1 < len(c):
            if b[b1] < c[c1]:
                b[b1],c[c1] = c[c1],b[b1]
                b1 += 1
                c1 += 1
                l += 1
            else:
                break
            
        res = max(res,sum(b))
print(max(res,sum(a)))
        