

iN ,iX  = [int(x) for x in input().split()]

aX = [int(x) for x in input().split()]



aCum = [0]*iN

aCum[0] = aX[0]

for i in range(1,iN):

    aCum[i]=aCum[i-1]+aX[i]



def fCeil(iT,iR):

    return -1 * iT // iR * -1

#マネして記法を圧縮してみたがどうだろう

def fCalcCost(iN,iX,aCum,iK):

    return (iN + iK ) * iX + 5 * aCum[-1] +sum(2*aCum[-i*iK -1] for i in range(2,fCeil(iN,iK)))



iTotalCost = fCalcCost(iN,iX,aCum,1)

iULim = fCeil(iN,2) + 1

for iK in range(2,fCeil(iN,2)+1):

    iThisCost = fCalcCost(iN,iX,aCum,iK)

    if iThisCost > iTotalCost:

        break

    else:

        iTotalCost = iThisCost

print(iTotalCost)

iN ,iX  = [int(x) for x in input().split()]

#かえって遅い？

aCum = [0]

for x in input().split():

    aCum += [aCum[-1] + int(x)]



def fCeil(iT,iR):

    return -1 * iT // iR * -1



def fCalcCost(iN,iX,aCum,iK):

    iCost = (iN + iK ) * iX + 5 * aCum[-1]

    for i in range(2,fCeil(iN,iK) ):

        iCost += 2 * aCum[iN - i * iK ]

    return iCost



#枝刈り

iTotalCost = fCalcCost(iN,iX,aCum,1)

for iK in range(2,fCeil(iN,2) + 1):

    iThisCost = fCalcCost(iN,iX,aCum,iK)

    if iThisCost > iTotalCost:

        break

    else:

        iTotalCost = iThisCost

print(iTotalCost)

iN, iX = [int(x) for x in input().split()]
aX = [int(x) for x in input().split()]
aCum = [0] * iN
aCum[0] = aX[0]
for i in range(1, iN):
    aCum[i] = aCum[i - 1] + aX[i]


def fCeil(iT, iR):
    return -1 * iT // iR * -1


# マネして記法を圧縮してみたがどうだろう
def fCalcCost(iN, iX, aCum, iK):
    return (
        (iN + iK) * iX
        + 5 * aCum[-1]
        + sum(2 * aCum[-i * iK - 1] for i in range(2, fCeil(iN, iK)))
    )


iTotalCost = fCalcCost(iN, iX, aCum, 1)
iULim = fCeil(iN, 2) + 1
for iK in range(2, fCeil(iN, 2) + 1):
    iThisCost = fCalcCost(iN, iX, aCum, iK)
    if iThisCost > iTotalCost:
        break
    else:
        iTotalCost = iThisCost
print(iTotalCost)

iN, iX = [int(x) for x in input().split()]
# かえって遅い？
aCum = [0]
for x in input().split():
    aCum += [aCum[-1] + int(x)]


def fCeil(iT, iR):
    return -1 * iT // iR * -1


def fCalcCost(iN, iX, aCum, iK):
    iCost = (iN + iK) * iX + 5 * aCum[-1]
    for i in range(2, fCeil(iN, iK)):
        iCost += 2 * aCum[iN - i * iK]
    return iCost


# 枝刈り
iTotalCost = fCalcCost(iN, iX, aCum, 1)
for iK in range(2, fCeil(iN, 2) + 1):
    iThisCost = fCalcCost(iN, iX, aCum, iK)
    if iThisCost > iTotalCost:
        break
    else:
        iTotalCost = iThisCost
print(iTotalCost)

-aX = [int(x) for x in input().split()] -aCum = [0] * iN -aCum[0] = aX[0] -for i in range(1, iN): -    aCum[i] = aCum[i - 1] + aX[i] +# かえって遅い？ +aCum = [0] +for x in input().split(): +    aCum += [aCum[-1] + int(x)] -# マネして記法を圧縮してみたがどうだろう -    return ( -        (iN + iK) * iX -        + 5 * aCum[-1] -        + sum(2 * aCum[-i * iK - 1] for i in range(2, fCeil(iN, iK))) -    ) +    iCost = (iN + iK) * iX + 5 * aCum[-1] +    for i in range(2, fCeil(iN, iK)): +        iCost += 2 * aCum[iN - i * iK] +    return iCost +# 枝刈り -iULim = fCeil(iN, 2) + 1