#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 5;
long long n, x, a[maxn], A[maxn];
long long val(long long x) { return x == 1 ? 5 : 2 * x + 1; }
int main() {
  scanf("%lld%lld", &n, &x);
  long long ans = (1ll << 63);
  for (long long i = 1; i <= n; ++i)
    scanf("%lld", &a[i]), A[i] = A[i - 1] + a[i];
  for (long long k = 1; k <= n; ++k) {
    long long cans = 0, cnt = 1;
    for (long long i = n; i > 0; i -= k, ++cnt)
      cans += (A[i] - A[max(i - k, 0ll)]) * val(cnt);
    ans = min(ans, cans + (n + k) * x);
  }
  printf("%lld\n", ans);
  return 0;
}
