n,v = map(int,input().split()) C = list(map(int,input().split())) cost = [] now = 0 mi = 10**20 mnum = 0 mcost = 0 for i,c in enumerate(C,1): now += c cost.append([now/i,now]) if mi > now/i: mi = min(mi,now/i) mnum = i mcost= now base = 0 base += sum(C) v -= min(v,n) took = max(0,(v-100)//mnum) base += took*mcost v -= took*mnum inf = 10**20 dp = [inf]*(v+1) dp[0] = 0 for i in range(1,n+1): c = cost[i-1][1] for j in range(v): if dp[j] == inf: continue if j + i <= v: dp[j+i] = min(dp[j+i],dp[j]+c) print(base+dp[-1])