#include <iostream>

using namespace std;

typedef unsigned long long ULL;
const int LIM = 2000 + 10;
ULL dat[LIM];
ULL preSum[LIM];

inline ULL mini(ULL a, ULL b) {
    return a < b ? a : b;
}

int main(void) {
    ULL n, x;
    scanf("%llu%llu", &n, &x);
    for (int i = 0; i < n; i++)
        scanf("%llu", dat + i), preSum[i] = dat[i] + (i ? preSum[i - 1] : 0);
    ULL ans = x * n + x * ((n + 1) / 2) + preSum[n - 1] * 5;
    ULL cnt = (n + 1) / 2;
    for (ULL i = 1; i < cnt; i++) {
        ULL tmp = x * (n + i) + (preSum[n - 1] - preSum[n - i - 1]) * 5;
        ULL co = 7;
        for (int j = n - i - 1; j >= 0; j--, co += 2)
            tmp += dat[j] * co;
        ans = mini(ans, tmp);
    }
    printf("%llu\n", ans);
    return 0;
}
