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).
def solve(curr,other,k):
    t=0 
    while t<k and t<len(curr) and t<len(other) and other[t]>curr[t]:
        t+=1 
    return t

n,k=map(int,input().split())
arr=list(map(int,input().split()))
maxx=-10**100
for i in range(n):
    curr=[]
    other=sorted(arr[:i]+arr[i+1:],reverse=True)
    for j in range(i,n):
        curr.append(arr[j])
        curr.sort()
        if j<n-1:
            del other[other.index(arr[j+1])]
        #print(other)
        t=min(len(curr),len(other),k)
        t=solve(curr,other,k)
        maxx=max(maxx,sum(curr)-sum(curr[:t])+sum(other[:t]))
        #print(curr,other,sum(curr)-sum(curr[:t])+sum(other[:t]))
    #print(maxx)
    #print(curr,other)
print(maxx)