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 = [int(c) for c in input().split()]
a = [int(c) for c in input().split()]

best = -1000001

seq = []
other = []

for l in range(n):
    for r in range(l + 1, n + 1):
        seq = sorted(a[l:r])

        other = a[:l] + a[r:]
        other.sort()
        other.reverse()

        seq_sum = sum(seq)

        best = max(best, seq_sum)

        for sw in range(0, min(k, len(seq), len(other))):
            seq_sum = seq_sum - seq[sw] + other[sw]
            best = max(best, seq_sum)


print(best)


# 200 10
# -933 947 859 -503 947 -767 121 469 214 -381 -962 807 59 -702 -873 -747 -233 77 -853 -39 243 902 909 612 -248 238 -511 -897 933 536 732 322 -155 247 340 145 681 -469 -906 -768 -368 -356 -168 -466 -398 -528 -515 968 107 929 178 29 -938 766 -173 -544 128 905 -877 -134 469 214 788 530 984 -738 805 -317 619 -596 -170 799 -276 -53 -211 663 619 -951 -616 -117 -574 774 127 -532 69 210 901 668 517 -354 280 -746 369 -357 696 570 -918 -912 -23 405 -414 -962 504 -390 165 -767 -259 442 -523 38 910 -956 62 -665 -933 947 859 -503 947 -767 121 469 214 -381 -962 807 59 -702 -873 -747 -233 77 -853 -39 243 902 909 612 -248 238 -511 -897 933 536 732 322 -155 247 340 145 681 -469 -906 -768 -368 -356 -168 -466 -398 -528 -515 968 107 929 178 29 -938 766 -173 -544 128 905 -877 -134 469 214 788 530 984 -738 805 -317 619 -596 -170 799 -276 -53 -211 663 619 -951 -616 -117 -574 774 127 -933 947 859 -503 947 -767 121 469 214 -381 -962 807 59 -702 -873 -747 -233 77 -853 -39 243 902 909 612 -248 238 -511 -897 933 536 732 322 -155 247 340 145 681 -469 -906 -768 -368 -356 -168 -466 -398 -528 -515 968 107 929 178 29 -938 766 -173 -544 128 905 -877 -134 469 214 788 530 984 -738 805 -317 619 -596 -170 799 -276 -53 -211 663 619 -951 -616 -117 -574 774 127 -532 69 210 901 668 517 -354 280 -746 369 -357 696 570 -918 -912 -23 405 -414 -962 504 -390 165 -767 -259 442 -523 38 910 -956 62 -665 -933 947 859 -503 947 -767 121 469 214 -381 -962 807 59 -702 -873 -747 -233 77 -853 -39 243 902 909 612 -248 238 -511 -897 933 536 732 322 -155 247 340 145 681 -469 -906 -768 -368 -356 -168 -466 -398 -528 -515 968 107 929 178 29 -938 766 -173 -544 128 905 -877 -134 469 214 788 530 984 -738 805 -317 619 -596 -170 799 -276 -53 -211 663 619 -951 -616 -117 -574 774 127



