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).
import os
if not("BEFUNGEE_HOME" in os.environ.keys()):
    f=open("input.txt","r")
    input=f.readline
n,k=list(map(int,input().split()))
a=list(map(int,input().split()))

def f(l,r):
    original_sequence=a[l:r+1]
    outside_sequence=a[:l]+a[r+1:]
    original_sequence.sort()
    outside_sequence.sort(reverse=False)
    k_=min(k,len(original_sequence),len(outside_sequence))
    original_sequence[:k_]=max(original_sequence[:k_],outside_sequence[:k_])
    s=sum(original_sequence)
    return s

result=-2000000
for l in range(n):
    for r in range(l,n):
        result=max(f(l,r),result)

print(result)