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 = input().split(" ")
max_ = -1000
ls = []
for i in range(n):
    ls.append(int(a[i]))
len_ = len(ls)
for i in range(0, len_ - 1):
    ls_mid = []
    ls_lt = []
    ls_rt = []
    ls_out = []
    for j in range(i + 1, len_):
        sum_ = 0
        v = k
        ls_mid = ls[i: j + 1]
        ls_lt = ls[0: i]
        ls_rt = ls[j + 1: len_]
        ls_out.extend(ls_lt)
        ls_out.extend(ls_rt)
        while True:
            if len(ls_mid) == 0:
                break
            else:
                Min = min(ls_mid)
                ls_mid.remove(Min)
            if len(ls_out) == 0:
                break
            else:
                Max = max(ls_out)
                ls_out.remove(Max)
                if Min < Max:
                    sum_ += Max
                    v -= 1
                    if v == 0:
                        break
                    else:
                        continue
                else:
                    ls_mid.append(Min)
                    break
        if v == k:
            max_ = max(max_, max(ls_mid), sum(ls_mid))
        else:
            max_ = max(max_, sum_ + sum(ls_mid))
        ls_out.clear()
print(max_)
	 	  	  	  			  	 				 	    	 	