#include <bits/stdc++.h>
using namespace std;
long long n, X, x[200010], sum[200010], Ans = 1LL << 62;
int main() {
  cin >> n >> X;
  for (int i = 1; i <= n; ++i) scanf("%lld", x + i), sum[i] = sum[i - 1] + x[i];
  for (long long k = 1; k <= n; ++k) {
    long long res = k * X;
    for (int j = 0; j <= n / k; ++j) {
      long long M = n - j * k, m;
      m = max(M - k, 0LL);
      long long c = j == 0 ? 5 : j * 2 + 3;
      res += (long long)c * (sum[M] - sum[m]);
      if (res < 0) break;
    }
    if (res > 0) Ans = min(Ans, res);
  }
  cout << Ans + n * X;
  return 0;
}
