from heapq import heapify, heappop, heappush N,K=map(int,input().split()) A=list(map(int,input().split())) if N%2==1 and N//2+11: CNT+=1 T=EA[i][0] ANS+=EA[i][1] if CNT==K: break if CNT==K: print(ANS) else: print("Impossible")