/*
Stranger than the comet as it streaks across the sky
Stranger than the truth I know before my open eyes
I have dealt in mysteries and trickery, of light to entertain
Looked into the abyss, called it by its name

I have plundered time itself, put the world inside it
And the mysteries, day and night, divide it
A plague of wonders, on your knees beside me
Know the secrets, you shall not deride us

My dreams of empire for my frozen queen
Will come to pass
Know me, the Magus
I am Dr. Dee
And this is my house

I am the master of the tides
I shame the mirror in my sight
What random music of the spheres across the years

Know this I will return to this land
Rebuild where the ruins did stand
Chain of the demons set free
Strange alchemy

Gather round the aimless and the feckless and the lame
Hear the master summon up the spirits by their names
I curse you Edward Kelly your betrayal for eternity is damned
Know you speak with demons you cannot command

Even as I looked into the glass then I was blinded
Burning by the Mortlake shore my house my books inside it
You have taken up my wife and lain beside her
Now the black rain on my house, the timbers burning

My dreams of empire for my frozen queen
Will come to pass
Know me, the Magus
I am Dr. Dee
And this was my house

I was the keeper of the books
I had the knowledge of the scrolls
But now through ignorance and fear
I cast a shadow through the years

Know this I will return to this land
Rebuild where the ruins did stand
Chain of the demons set free
Strange alchemy

Know this
I will return to this land
Rebuild where the ruins did stand
Chain of the demons set free
Strange alchemy

Know this
I will return to this land
Rebuild where the ruins did stand
Restore the knowledge memory
Strange alchemy
*/

#pragma GCC optimize("O3")
#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <iostream>
#include <string>
#include <complex>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stdio.h>
#include <stack>
#include <algorithm>
#include <list>
#include <ctime>

#include <memory.h>
#include <assert.h>

#define y0 sdkfaslhagaklsldk

#define y1 aasdfasdfasdf
#define yn askfhwqriuperikldjk
#define j1 assdgsdgasghsf
#define tm sdfjahlfasfh
#define lr asgasgash
#define norm asdfasdgasdgsd
#define have adsgagshdshfhds
#define ends asdgahhfdsfshdshfd
#define prev asdgSHJsfgsdfhdsh
#define hash asdgasdgasdgdfrywewery

#define eps 1e-8
#define M_PI 3.141592653589793
#define bsize 512

#define ldouble long double
using namespace std;

#define bs 1000000007

const int N = 600000;

int n;
long long X,x[N],p[N];

long long eval(long long blocks){
	long long here=blocks*1ll*X+1ll*n*X;
	int C=0;
	int b=1;
	for (int i=n;i>=1;--i){
		++C;
		if (C>blocks)
			C=1,
			b++;
		here+=p[b]*x[i];
	}
	return here;
}

long long naive(){
	long long ans=1e18;
	for (int i=1;i<=n;i++){
		ans=min(ans,eval(i));
	}
	return ans;
}

long long smart(){
	int l,r;
	l=1;
	r=n;
	while (r>l+5){
		int mid1=l*2+r;
		int mid2=l+r*2;
		mid1/=3;
		mid2/=3;
		long long v1=eval(mid1);
		long long v2=eval(mid2);
		if (v1<=v2)
			r=mid2;
		else
			l=mid1;
	}
	long long ans=1e18;
	for (int i=l;i<=r;i++){
		ans=min(ans,eval(i));
	}
	return ans;
}

void stress(){
	while (true){
		n=rand()%1000+1;
		X=rand()%1000;
		for (int i=1;i<=n;i++){
			x[i]=x[i-1]+rand()%10+1;
		}
		long long a=naive();
		long long b=smart();
		cout<<a<<" "<<b<<endl;
		if (a!=b){
			while (true);
		}
	}
}

int main(){
//	freopen("apache.in","r",stdin);
//	freopen("apache.out","w",stdout);
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(0);
	//cin.tie(0);

	//stress();

	cin>>n>>X;
	for (int i=1;i<=n;i++){
		cin>>x[i];
	}

	p[1]=p[2]=5;
	for (int i=3;i<=n;i++){
		p[i]=p[i-1]+2;
	}

	cout<<smart()<<endl;

	//cout<<naive()<<" "<<smart()<<endl;



//	cin.get(); cin.get();
	return 0;
}


Measured memory_bytes: 5888