

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):

    iCost = 5 * aCum[-1]

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

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

#   i = 2

#   while  i*iK < iN  :

#       iCost += 2 * aCum[-1 * i * iK -1]

#       i += 1

    iCost += (iK +iN)*iX

    return iCost



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

for iK in range(2,iN//2 + 2):

    iTotalCost = min(iTotalCost,fCalcCost(iN,iX,aCum,iK))

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):

    iCost = 5 * aCum[-1]

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

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

    iCost += (iK +iN)*iX

    return iCost



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

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

    iTotalCost = min(iTotalCost,fCalcCost(iN,iX,aCum,iK))

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):
    iCost = 5 * aCum[-1]
    for i in range(2, fCeil(iN, iK)):
        iCost += 2 * aCum[-1 * i * iK - 1]
    #   i = 2
    #   while  i*iK < iN  :
    #       iCost += 2 * aCum[-1 * i * iK -1]
    #       i += 1
    iCost += (iK + iN) * iX
    return iCost


iTotalCost = fCalcCost(iN, iX, aCum, 1)
for iK in range(2, iN // 2 + 2):
    iTotalCost = min(iTotalCost, fCalcCost(iN, iX, aCum, iK))
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):
    iCost = 5 * aCum[-1]
    for i in range(2, fCeil(iN, iK)):
        iCost += 2 * aCum[-1 * i * iK - 1]
    iCost += (iK + iN) * iX
    return iCost


iTotalCost = fCalcCost(iN, iX, aCum, 1)
for iK in range(2, fCeil(iN, 2) + 1):
    iTotalCost = min(iTotalCost, fCalcCost(iN, iX, aCum, iK))
print(iTotalCost)

-    #   i = 2 -    #   while  i*iK < iN  : -    #       iCost += 2 * aCum[-1 * i * iK -1] -    #       i += 1 -for iK in range(2, iN // 2 + 2): +for iK in range(2, fCeil(iN, 2) + 1):