#include <bits/stdc++.h>
using namespace std;

typedef double lf; typedef long long ll; typedef vector<ll> vll; typedef long double llf; typedef pair<ll, ll> pll; typedef vector<int> vint; typedef unsigned int uint; typedef pair<int, int> pii; typedef unsigned long long ull;

bool Dbg;
const int mod = 998244353, MAXN = 1e5 + 7, inft = 1e9 + 7; const ll infl = llf(1e18) + 1;
const llf eps = 1e-7;

#define xx first
#define yy second
#define pb push_back
#define mp make_pair
#define mid ((l+r)>>1)
//ans = mid, l = mid+1
#define Debug(x) (Dbg ? void(cerr << #x << " = " << x << ' ') : void())
#define debug(...) (Dbg ? (fprintf(stderr, __VA_ARGS__)) : 0)
#define lop(i,a,b) for(int i = (a), i##end = (b); i <= i##end; ++i)
//toposort
#define dlop(i,a,b) for(int i = (a), i##end = (b); i >= i##end; --i)
#define ergo(a) for(__typeof((a).end())it = (a).begin(), it##end = (a).end(); it != it##end; ++it)

template<typename T> inline T sqr(T x) {return x * x; }
template<typename T> inline T abs(T x) {return x >= 0 ? x : -x; }
template<typename A, typename B> inline A gcd(A a, B b) {if (a < b) swap(a, b); if (!b) return a; while (A t = a % b) a = b, b = t; return b; }
template<typename A, typename B> inline A lcm(A a, B b) {return a / gcd(a, b) * b; }
template<typename A, typename B> inline A Pow(A a, B b, int mod) {A ret; for (ret = 1; b; b >>= 1) {if (b & 1) ret = ret * 1ll * a % mod; a = a * 1ll * a % mod; } return ret % mod; }
template<typename A, typename B> inline A max(A a, B b) {return a > b ? a : b; } template<typename A, typename B> inline A min(A a, B b) {return a < b ? a : b; } template<typename A, typename B> inline void chmax(A &x, B y) {if (x < y) x = y; } template<typename A, typename B> inline void chmin(A &x, B y) {if (x > y) x = y; } template<typename A, typename B> inline void amod(A &x, B y) {x += y; while(x < 0) x += mod; while(x > mod) x -= mod; }

struct IO {
#define IS(x) (x == 10 || x == 13 || x == ' ')
#define OP operator
#define RT return *this
#define RX x=0;int t=P();while((t<'0'||t>'9')&&t!='-')t=P();f=1;\
  if(t=='-')t=P(),f=-1;x=t-'0';for(t=P();t>='0'&&t<='9';t=P())x=x*10+t-'0'
#define RU x=0;int t=P();while(t<'0'||t>'9')t=P();x=t-'0';for(t=P();t>='0'&&t<='9';t=P())x=x*10+t-'0'
#define TR *this,x;return x
#define WI if(x){if(x<0)P('-'),x=-x;c=0;while(x)s[c++]=x%10+'0',x/=10;while(c--)P(s[c]);}else P('0')
#define WU if(x){c=0;while(x)s[c++]=x%10+'0',x/=10;while(c--)P(s[c]);}else P('0')
  struct Cg {inline int operator()() {return getchar(); } }; struct Cp {inline void operator()(int x) {putchar(x); } }; template<typename T>struct Fr {int f; T P; inline Fr&OP, (int&x) {RX; x *= f; RT; } inline Fr&OP, (ll &x) {RX; x *= f; RT; } inline Fr&OP, (char&x) {for (x = P(); IS(x); x = P()); RT; } inline Fr&OP, (string&x) {cin >> x; RT; } inline Fr&OP, (char*x) {char t = P(); for (; IS(t); t = P()); if (~t) {for (; !IS(t) && ~t; t = P()) * x++ = t; }*x++ = 0; RT; } inline Fr&OP, (lf&x) {scanf("%lf", &x); RT; } inline Fr&OP, (llf&x) {lf y; scanf("%lf", &y); x = y; RT; } inline Fr&OP, (uint&x) {RU; RT; } inline Fr&OP, (ull&x) {RU; RT; } }; Fr<Cg>in; template<typename T>struct Fw {int c, s[24]; T P; inline Fw&OP, (int x) {WI; RT; } inline Fw&OP, (uint x) {WU; RT; } inline Fw&OP, (ll x) {WI; RT; } inline Fw&OP, (ull x) {WU; RT; } inline Fw&OP, (char x) {P(x); RT; } inline Fw&OP, (lf x) {printf("%.5lf", x); RT; } inline Fw&OP, (llf x) {printf("%.5lf", lf(x)); RT; } inline Fw&OP, (const string &x) {ergo(x) P(*it); RT; } inline Fw&OP, (const char*x) {while (*x)P(*x++); RT; } }; Fw<Cp>out;
} io;
#define in io.in
#define out io.out
//fread float

ll pre[MAXN<<1], ans = infl, n, x;

int main() {
#ifdef LOCAL_DEBUG
  // freopen("data.in", "r", stdin), freopen("data.out", "w", stdout);
  Dbg = 1;
  uint tim1 = clock();
#endif
  // 5 * pos[x] + 5 * pos[x - 1] * 7 * pos[x - 2]
  in, n, x;
  lop(i,1,n) {
    in, pre[i];
    pre[i] += pre[i-1];
  }
  lop(i,1,n) {
    ll tmp = 0, cost = 5;
    int r = n, flag = 0;
    for(int j = 1; r && tmp + 1ll * i * x < ans; ++j) {
      int l = r - i + 1; if (l < 1) l = 1;
      if (flag < 2) ++flag;
      else cost += 2;
      tmp += 1ll * cost * (pre[r] - pre[l - 1]);
      r = l - 1;
    }
    chmin(ans, tmp + 1ll * i * x);
  }
  out, ans + n * x;
#ifdef LOCAL_DEBUG
  fprintf(stderr, "\ntime:%.5lfms", (clock() - tim1) / (1.0 * CLOCKS_PER_SEC) * 1000);
#endif
  return 0;
}

Measured memory_bytes: 1792