#include<bits/stdc++.h>
using namespace std;
#define MN 200000
long long a[MN+5];
int main()
{
	int n,x,i,j;__int128 ans=1e18,s;
	scanf("%d%d",&n,&x);
	for(i=1;i<=n;++i)scanf("%lld",&a[i]),a[i]+=a[i-1];
	for(i=1;i<=n;++i)
	{
		s=2*(a[n]-a[n-i])+1LL*(n+i)*x;
		for(j=1;i*j<=n;++j)
			s+=(__int128)(2*j+1)*(a[n-i*j+i]-a[n-i*j]);
		ans=min(ans,s+(__int128)(2*j+1)*a[n-i*j+i]);
	}
	printf("%lld",(long long)ans);
}