#include <bits/stdc++.h>
using namespace std;
long long n, a[200005], x;
signed main() {
  scanf("%lld%lld", &n, &x);
  a[0] = 0;
  for (long long i = 1; i <= n; i++) scanf("%lld", a + i), a[i] += a[i - 1];
  long long ans = 0x3f3f3f3f3f3f3f3f, sum;
  for (long long k = 1; k <= n; k++) {
    sum = x * n + x * k;
    long long t = 3;
    for (long long i = n; i >= 1; i -= k) {
      sum += (a[i] - a[max(0ll, i - k)]) * max(5ll, t), t += 2;
      if (sum >= ans) break;
    }
    ans = min(ans, sum);
  }
  printf("%lld\n", ans);
  return 0;
}
