#include <bits/stdc++.h>
using namespace std;
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char x) {
  *oS++ = x;
  if (oS == oT) flush();
}
template <class I>
inline void read(I &x) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-') f = -1;
  for (x = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    x = x * 10 + (c & 15);
  x *= f;
}
template <class I>
inline void print(I x) {
  if (!x) putc('0');
  if (x < 0) putc('-'), x = -x;
  while (x) qu[++qr] = x % 10 + '0', x /= 10;
  while (qr) putc(qu[qr--]);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::print;
using io ::putc;
using io ::read;
const int MAXN = 200000;
unsigned long long sum[MAXN + 5];
int N;
unsigned long long X;
int main() {
  int i, j, k;
  read(N), read(X);
  for (int i = 1; i <= N; i++) {
    read(sum[i]);
    sum[i] += sum[i - 1];
  }
  unsigned long long ans = X * N + sum[N] * 5;
  for (int i = 1; i < N; i++) {
    unsigned long long res = X * i;
    if (2 * i >= N)
      res = res + sum[N] * 5;
    else {
      unsigned long long coef = 7;
      int lst = N - 2 * i;
      res = res + (sum[N] - sum[N - 2 * i]) * 5;
      while (lst >= i) {
        res = res + (sum[lst] - sum[lst - i]) * coef;
        lst -= i;
        coef += 2;
      }
      res = res + sum[lst] * coef;
    }
    if (res < ans) ans = res;
  }
  cout << ans + X * N;
  return 0;
}
